Skip to contentSkip to conversation

ARM: da850evm_direct_nor_defconfig: Enable DM_SERIAL

PATCH New Adam Ford 2 participants 2 messages Sep 19, 2018 – Sep 29, 2018

Subsystems (4)
lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH v3 1/1 ARM: da850evm_direct_nor_defconfig: Enable DM_SERIAL

With DM enabled, this patch enables DM_SERIAL and removes the NS16550 initialization from da850_lowlevel since the driver will take care of that itself.

---
V3: Make the include items referencing the serial info
dependent on DM_SERIAL and not SPL or NOR since both of these options will eventually use DM_SERIAL.

V2: Rebase against Master
Use CONFIG_IS_ENABLED instead of defined so this can be enabled/disabled in SPL independently.
Enable CONFIG_SYS_MALLOC_F to allow relocation allowing the serial to build correctly

arch/arm/mach-davinci/da850_lowlevel.c +2 -2
index 95dc93a24f..822e0dc4a1 100644
@@ -288,10 +288,10 @@ int arch_cpu_init(void)
 	/* GPIO setup */
 	board_gpio_init();
 
-
+#if !CONFIG_IS_ENABLED(DM_SERIAL)
 	NS16550_init((NS16550_t)(CONFIG_SYS_NS16550_COM1),
 			CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);
-
+#endif
 	/*
 	 * Fix Power and Emulation Management Register
 	 * see sprufw3a.pdf page 37 Table 24
configs/da850evm_direct_nor_defconfig +2 -1
index 4039d0ee59..42cb4127fd 100644
@@ -5,7 +5,6 @@ CONFIG_TARGET_DA850EVM=y
 CONFIG_DA850_LOWLEVEL=y
 CONFIG_TI_COMMON_CMD_OPTIONS=y
 CONFIG_NR_DRAM_BANKS=1
-# CONFIG_SYS_MALLOC_F is not set
 CONFIG_SYS_EXTRA_OPTIONS="USE_NOR,DIRECT_NOR_BOOT"
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
@@ -50,6 +49,8 @@ CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_EMAC=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
include/configs/da850evm.h +1 -1
index 14a6b9e591..319f6aadf5 100644
@@ -116,7 +116,7 @@
  * Serial Driver info
  */
 
-#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_DIRECT_NOR_BOOT)
+#if !CONFIG_IS_ENABLED(DM_SERIAL)
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE	-4	/* NS16550 register size */
 #define CONFIG_SYS_NS16550_COM1	DAVINCI_UART2_BASE /* Base address of UART2 */
Signature · 1 line
2.17.1
#1 lore raw

PATCH v3 1/1 ARM: da850evm_direct_nor_defconfig: Enable DM_SERIAL

Quoted 5 lines · Adam Ford

With DM enabled, this patch enables DM_SERIAL and removes the NS16550 initialization from da850_lowlevel since the driver will take care of that itself.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180929/79146bcf/attachment.sig>