]> git.baikalelectronics.ru Git - uboot.git/commitdiff
omap3: pandora: Enable DM_SERIAL
authorGrazvydas Ignotas <notasas@gmail.com>
Sat, 25 Aug 2018 19:40:08 +0000 (22:40 +0300)
committerTom Rini <trini@konsulko.com>
Tue, 11 Sep 2018 01:19:31 +0000 (21:19 -0400)
This patch enables DM_SERIAL for the pandora board. Verified that
the default kernel can still be booted with this.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
board/pandora/pandora.c
configs/omap3_pandora_defconfig
include/configs/omap3_pandora.h

index 4f91dc3bee18fb032377a85a09891e3a8c6fc594..a9aae7951d965fba06c0e26339d254078114a867 100644 (file)
@@ -13,6 +13,8 @@
  * Texas Instruments, <www.ti.com>
  */
 #include <common.h>
+#include <dm.h>
+#include <ns16550.h>
 #include <twl4030.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
@@ -33,6 +35,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.
index 6dce53834da50bd829946965486e3334ce133084..c2b4a4f0d2b114249a8a61bb7d52c2a4c647c6f9 100644 (file)
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_SYS_TEXT_BASE=0x80008000
+CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_OMAP3_PANDORA=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_NR_DRAM_BANKS=2
@@ -25,11 +26,12 @@ CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:512k(xloader),1920k(uboot),128k(uboot-env),10m(boot),-(rootfs)"
 CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_DM=y
 CONFIG_TWL4030_LED=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
-CONFIG_CONS_INDEX=3
+CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_OMAP3_SPI=y
index 5a82cbee7108e89cd0d4e2533f5806ccb7c4d3b7..82c66c4b8c45778e9f368d57972bd6855e393d49 100644 (file)
 
 #define CONFIG_SYS_DEVICE_NULLDEV      1
 
-/*
- * Hardware drivers
- */
-
-/* TWL4030 LED */
-
-/*
- * NS16550 Configuration
- */
-#undef CONFIG_SYS_NS16550_CLK
-#define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_REG_SIZE    (-4)
-#define CONFIG_SYS_NS16550_CLK         V_NS16550_CLK
-#define CONFIG_SYS_NS16550_COM3                OMAP34XX_UART3
-
-/* commands to include */
-
 /*
  * Board NAND Info.
  */