Merge tag 'ti-v2020.07-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti
[oweals/u-boot.git] / board / pandora / pandora.c
index 59b5a7e2cd01c34afe4524ef4d8e31f4c1f49f68..a93848666fea3380a5b76cb36c8c9fe463bf0aa5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2008
  * Grazvydas Ignotas <notasas@gmail.com>
  *
  * (C) Copyright 2004-2008
  * Texas Instruments, <www.ti.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 #include <common.h>
+#include <dm.h>
+#include <init.h>
+#include <ns16550.h>
 #include <twl4030.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
@@ -22,6 +24,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-types.h>
+#include <linux/delay.h>
 #include "pandora.h"
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -34,6 +37,18 @@ DECLARE_GLOBAL_DATA_PTR;
 #define GPIO_IO_PWRDNZ                 (1 << 6)
 #define PBIASLITEVMODE1                        (1 << 8)
 
+static const struct ns16550_platdata pandora_serial = {
+       .base = OMAP34XX_UART3,
+       .reg_shift = 2,
+       .clock = V_NS16550_CLK,
+       .fcr = UART_FCR_DEFVAL,
+};
+
+U_BOOT_DEVICE(pandora_uart) = {
+       "ns16550_serial",
+       &pandora_serial
+};
+
 /*
  * Routine: board_init
  * Description: Early hardware init.
@@ -102,7 +117,7 @@ int misc_init_r(void)
                TWL4030_BB_CFG_BBCHEN | TWL4030_BB_CFG_BBSEL_3200MV |
                TWL4030_BB_CFG_BBISEL_500UA);
 
-       dieid_num_r();
+       omap_die_id_display();
 
        return 0;
 }
@@ -121,7 +136,7 @@ void set_muxconf_regs(void)
        }
 }
 
-#ifdef CONFIG_GENERIC_MMC
+#ifdef CONFIG_MMC
 int board_mmc_init(bd_t *bis)
 {
        return omap_mmc_init(0, 0, 0, -1, -1);