]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
am335x_evm: Convert CONFIG_CONS_INDEX into a menu choice
authorTom Rini <trini@ti.com>
Fri, 1 Aug 2014 13:53:24 +0000 (09:53 -0400)
committerTom Rini <trini@ti.com>
Mon, 25 Aug 2014 14:48:13 +0000 (10:48 -0400)
- Drop CONFIG_SERIAL[1-6] and use CONFIG_CONS_INDEX tests instead
- Add choice and help text to board/ti/am335x/Kconfig
- Correct comment about IDK in board/ti/am335x/mux.c
- Remove am335x_evm_uart* defconfig files as they're just variations
  on a config option now.

Signed-off-by: Tom Rini <trini@ti.com>
13 files changed:
board/ti/am335x/Kconfig
board/ti/am335x/board.c
board/ti/am335x/mux.c
configs/am335x_evm_defconfig
configs/am335x_evm_nor_defconfig
configs/am335x_evm_norboot_defconfig
configs/am335x_evm_spiboot_defconfig
configs/am335x_evm_uart1_defconfig [deleted file]
configs/am335x_evm_uart2_defconfig [deleted file]
configs/am335x_evm_uart3_defconfig [deleted file]
configs/am335x_evm_uart4_defconfig [deleted file]
configs/am335x_evm_uart5_defconfig [deleted file]
configs/am335x_evm_usbspl_defconfig

index c3b61af2631a4dba9aaa4b640e5896123a2f3c54..0e5149c69c63ef0c36712d7a384423505d4b80a2 100644 (file)
@@ -20,4 +20,13 @@ config SYS_CONFIG_NAME
        string
        default "am335x_evm"
 
+config CONS_INDEX
+       int "UART used for console"
+       default 1
+       help
+         The AM335x SoC has a total of 6 UARTs (UART0 to UART5 as referenced
+         in documentation, etc) available to it.  Depending on your specific
+         board you may want something other than UART0 as for example the IDK
+         uses UART3 so enter 4 here.
+
 endif
index d81eec90b44b0a9d4802a0c3bb29fe3311d21afc..0739e6021a21e71d7d0f5c840b793ce7fdf98fae 100644 (file)
@@ -383,24 +383,19 @@ const struct dpll_params *get_dpll_ddr_params(void)
 
 void set_uart_mux_conf(void)
 {
-#ifdef CONFIG_SERIAL1
+#if CONFIG_CONS_INDEX == 1
        enable_uart0_pin_mux();
-#endif /* CONFIG_SERIAL1 */
-#ifdef CONFIG_SERIAL2
+#elif CONFIG_CONS_INDEX == 2
        enable_uart1_pin_mux();
-#endif /* CONFIG_SERIAL2 */
-#ifdef CONFIG_SERIAL3
+#elif CONFIG_CONS_INDEX == 3
        enable_uart2_pin_mux();
-#endif /* CONFIG_SERIAL3 */
-#ifdef CONFIG_SERIAL4
+#elif CONFIG_CONS_INDEX == 4
        enable_uart3_pin_mux();
-#endif /* CONFIG_SERIAL4 */
-#ifdef CONFIG_SERIAL5
+#elif CONFIG_CONS_INDEX == 5
        enable_uart4_pin_mux();
-#endif /* CONFIG_SERIAL5 */
-#ifdef CONFIG_SERIAL6
+#elif CONFIG_CONS_INDEX == 6
        enable_uart5_pin_mux();
-#endif /* CONFIG_SERIAL6 */
+#endif
 }
 
 void set_mux_conf_regs(void)
index 2a18ccbedefc3e731c575eafc317eb0fe487480d..f4bb9f890b5bf4bdb7cca8ecd67dcfadb0cd650a 100644 (file)
@@ -345,12 +345,7 @@ void enable_board_pin_mux(struct am335x_baseboard_id *header)
                        configure_module_pin_mux(spi0_pin_mux);
                }
        } else if (board_is_idk(header)) {
-               /*
-                * Industrial Motor Control (IDK)
-                * note: IDK console is on UART3 by default.
-                *       So u-boot mus be build with CONFIG_SERIAL4 and
-                *       CONFIG_CONS_INDEX=4
-                */
+               /* Industrial Motor Control (IDK) */
                configure_module_pin_mux(mii1_pin_mux);
                configure_module_pin_mux(mmc0_no_cd_pin_mux);
        } else if (board_is_evm_sk(header)) {
index 7710dc064e89c0551f6efe15b8d1a2e1ad5ed18b..2e5aeaa4dd4840732886b1a6e1ae5b0a38b816e0 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND"
+CONFIG_SYS_EXTRA_OPTIONS="NAND"
+CONFIG_CONS_INDEX=1
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_AM335X_EVM=y
index fecec5e4ebf8892ac89ca3c3fcbde98c3daf7061..41f31cc02e90ad9f59ffbe28875e1cd7c97c76b5 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND,NOR"
+CONFIG_SYS_EXTRA_OPTIONS="NAND,NOR"
+CONFIG_CONS_INDEX=1
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_AM335X_EVM=y
index 6005c22ddb2287be7f93bb746f9fd1c8faaf20ee..7dbfa277e0a289ed04faf729ae6d2fea059268a4 100644 (file)
@@ -1,3 +1,4 @@
-CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NOR,NOR_BOOT"
+CONFIG_SYS_EXTRA_OPTIONS="NOR,NOR_BOOT"
+CONFIG_CONS_INDEX=1
 CONFIG_ARM=y
 CONFIG_TARGET_AM335X_EVM=y
index 389d1d89bf27982a89cd837543cc72c164d5b965..a6188ea72666171f7012f9c737f982dc2d34cbc9 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,SPI_BOOT"
+CONFIG_SYS_EXTRA_OPTIONS="SPI_BOOT"
+CONFIG_CONS_INDEX=1
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_AM335X_EVM=y
diff --git a/configs/am335x_evm_uart1_defconfig b/configs/am335x_evm_uart1_defconfig
deleted file mode 100644 (file)
index 14e8879..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="SERIAL2,CONS_INDEX=2,NAND"
-+S:CONFIG_ARM=y
-+S:CONFIG_TARGET_AM335X_EVM=y
diff --git a/configs/am335x_evm_uart2_defconfig b/configs/am335x_evm_uart2_defconfig
deleted file mode 100644 (file)
index 706ced9..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="SERIAL3,CONS_INDEX=3,NAND"
-+S:CONFIG_ARM=y
-+S:CONFIG_TARGET_AM335X_EVM=y
diff --git a/configs/am335x_evm_uart3_defconfig b/configs/am335x_evm_uart3_defconfig
deleted file mode 100644 (file)
index 4706868..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="SERIAL4,CONS_INDEX=4,NAND"
-+S:CONFIG_ARM=y
-+S:CONFIG_TARGET_AM335X_EVM=y
diff --git a/configs/am335x_evm_uart4_defconfig b/configs/am335x_evm_uart4_defconfig
deleted file mode 100644 (file)
index 8ab7769..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="SERIAL5,CONS_INDEX=5,NAND"
-+S:CONFIG_ARM=y
-+S:CONFIG_TARGET_AM335X_EVM=y
diff --git a/configs/am335x_evm_uart5_defconfig b/configs/am335x_evm_uart5_defconfig
deleted file mode 100644 (file)
index ea3b761..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="SERIAL6,CONS_INDEX=6,NAND"
-+S:CONFIG_ARM=y
-+S:CONFIG_TARGET_AM335X_EVM=y
index b6b30c6228e3eb4a8675dc68da3de2721d9f3db3..352c1fb5963a67caa805bc478c275f3b8c00fc35 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND,SPL_USBETH_SUPPORT"
+CONFIG_SYS_EXTRA_OPTIONS="NAND,SPL_USBETH_SUPPORT"
+CONFIG_CONS_INDEX=1
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_AM335X_EVM=y