[U-Boot] [PATCH] arm: am335x: add Kconfig range attribute to prevent invalid CONS_INDEX

Masahiro Yamada yamada.m at jp.panasonic.com
Sun Aug 31 18:05:32 CEST 2014


The help message in board/ti/am335x/Kconfig says AM335x has
6 UARTs, so the valid number for CONFIG_CONS_INDEX is from 1 to 6.

Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
Cc: Tom Rini <trini at ti.com>
---

BTW, why does CONFIG_CONS_INDEX start from 1, not 0.

CONFIG_CONS_INDEX=1 correponds to UART0 ?


 board/ti/am335x/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/board/ti/am335x/Kconfig b/board/ti/am335x/Kconfig
index 0e5149c..80701f5 100644
--- a/board/ti/am335x/Kconfig
+++ b/board/ti/am335x/Kconfig
@@ -22,6 +22,7 @@ config SYS_CONFIG_NAME
 
 config CONS_INDEX
 	int "UART used for console"
+	range 1 6
 	default 1
 	help
 	  The AM335x SoC has a total of 6 UARTs (UART0 to UART5 as referenced
-- 
1.9.1



More information about the U-Boot mailing list