Commit 6f6b7cfa authored by Tom Rini's avatar Tom Rini
Browse files

Convert all of CONFIG_CONS_INDEX to Kconfig



This converts the following to Kconfig:
   CONFIG_CONS_INDEX

We have existing entries for this option in a number of places, with
different guards on them.  They're also sometimes used for things not
directly inside of the serial driver.  First, introduce a new symbol to
guard the use of CONFIG_CONS_INDEX, so that in the case where we don't
need this for the serial driver, but for some other use, we can still do
it.  Next, consolidate all of these into the single entry in
drivers/serial/Kconfig.  Finally, introduce CONS_INDEX_[023456] so that
we can imply a correct value here to make the defconfig side of this
smaller.
Signed-off-by: default avatarAdam Ford <aford173@gmail.com>
[trini: Rework a lot of the logic here, such that I took authorship from
Adam, but kept his S-o-B line]
Signed-off-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
parent 7dc7a38c
......@@ -725,6 +725,7 @@ config ARCH_SUNXI
select OF_BOARD_SETUP
select OF_CONTROL
select OF_SEPARATE
select SPECIFY_CONSOLE_INDEX
select SPL_STACK_R if SPL
select SPL_SYS_MALLOC_SIMPLE if SPL
select SYS_NS16550
......@@ -914,6 +915,7 @@ config TARGET_HIKEY
select DM_SERIAL
select OF_CONTROL
select PL01X_SERIAL
select SPECIFY_CONSOLE_INDEX
help
Support for HiKey 96boards platform. It features a HI6220
SoC, with 8xA53 CPU, mali450 gpu, and 1GB RAM.
......
......@@ -19,7 +19,6 @@
#define CONFIG_SYS_NS16550_CLK 100000000
#define CONFIG_SYS_NS16550_CLK_DIV 54
#define CONFIG_SERIAL_MULTI
#define CONFIG_CONS_INDEX 3
#define CONFIG_SYS_NS16550_COM3 0x18023000
/* Ethernet */
......
......@@ -16,7 +16,6 @@
#define CONFIG_SYS_NS16550_REG_SIZE 1
#define CONFIG_SYS_NS16550_CLK 0x03b9aca0
#define CONFIG_CONS_INDEX 1
#define CONFIG_SYS_NS16550_COM1 0x18000300
#endif /* __ARCH_CONFIGS_H */
......@@ -27,12 +27,6 @@
#define CONFIG_SYS_NS16550_CLK 13000000
#endif
#if !defined(CONFIG_LPC32XX_HSUART)
#define CONFIG_CONS_INDEX (CONFIG_SYS_LPC32XX_UART - 2)
#else
#define CONFIG_CONS_INDEX CONFIG_SYS_LPC32XX_UART
#endif
#define CONFIG_SYS_BAUDRATE_TABLE \
{ 9600, 19200, 38400, 57600, 115200, 230400, 460800 }
......
......@@ -74,6 +74,7 @@ config OMAP54XX
config TI814X
bool "TI814X SoC"
select SPECIFY_CONSOLE_INDEX
help
Support for AM335x SOC from Texas Instruments.
The AM335x high performance SOC features a Cortex-A8
......@@ -81,6 +82,7 @@ config TI814X
config TI816X
bool "TI816X SoC"
select SPECIFY_CONSOLE_INDEX
imply NAND_OMAP_ELM
imply NAND_OMAP_GPMC
help
......@@ -90,6 +92,7 @@ config TI816X
config AM43XX
bool "AM43XX SoC"
select SPECIFY_CONSOLE_INDEX
imply NAND_OMAP_ELM
imply NAND_OMAP_GPMC
imply SPL_DM
......@@ -111,6 +114,7 @@ config AM43XX
config AM33XX
bool "AM33XX SoC"
select SPECIFY_CONSOLE_INDEX
imply NAND_OMAP_ELM
imply NAND_OMAP_GPMC
imply SPL_NAND_AM33XX_BCH
......
......@@ -80,6 +80,7 @@ config MACH_SUN5I
select ARM_CORTEX_CPU_IS_UP
select SUNXI_GEN_SUN4I
select SUPPORT_SPL
imply CONS_INDEX_2 if !DM_SERIAL
config MACH_SUN6I
bool "sun6i (Allwinner A31)"
......@@ -110,6 +111,7 @@ config MACH_SUN8I_A23
select SUNXI_GEN_SUN6I
select SUPPORT_SPL
select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
imply CONS_INDEX_5 if !DM_SERIAL
config MACH_SUN8I_A33
bool "sun8i (Allwinner A33)"
......@@ -120,6 +122,7 @@ config MACH_SUN8I_A33
select SUNXI_GEN_SUN6I
select SUPPORT_SPL
select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
imply CONS_INDEX_5 if !DM_SERIAL
config MACH_SUN8I_A83T
bool "sun8i (Allwinner A83T)"
......
......@@ -12,16 +12,6 @@ config SYS_SOC
config SYS_CONFIG_NAME
default "bav335x"
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
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.
config BAV_VERSION
int "BAV335x Version (1=A, 2=B)"
range 1 2
......
......@@ -17,22 +17,6 @@ config SYS_SOC
config SYS_CONFIG_NAME
default "pdu001"
config CONS_INDEX
int "UART used for console"
range 1 6
default 4
help
The AM335x SoC has a total of 6 UARTs (UART0 to UART5 as referenced
in documentation, etc) available to it. The best choice for the
PDU001 is UART3 as it is wired to the header K2; enter 4 here to
use UART3. UART0 is connected to the EIA-485 transceiver. If you
really need to use it, you are advised to remove the transceiver U14
from the board. UART1 is wired to the backplane and therefore
accessible from there or by the backplane connector K1 of the PDU.
Any other UART then UART3 (enter 4 here), UART1 (enter 2 here) or
UART0 (enter 1 here) are not sensible since they are not wired to
any connector and therefore difficult to access.
choice
prompt "State of Run LED"
default PDU001_RUN_LED_RED
......
......@@ -12,11 +12,4 @@ config SYS_SOC
config SYS_CONFIG_NAME
default "hikey"
config CONS_INDEX
int "UART used for console"
range 1 4
default 4
help
The hi6220 SoC has 5 UARTs. For example to use UART0 enter 1 here.
endif
......@@ -12,14 +12,4 @@ config SYS_SOC
config SYS_CONFIG_NAME
default "am335x_sl50"
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
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
......@@ -12,16 +12,6 @@ config SYS_SOC
config SYS_CONFIG_NAME
default "am335x_evm"
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
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.
config NOR
bool "Support for NOR flash"
help
......
......@@ -9,15 +9,6 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "am57xx_evm"
config CONS_INDEX
int "UART used for console"
range 1 6
default 3
help
The AM57x (and DRA7xx) SoC has a total of 6 UARTs available to it.
Depending on your specific board you may want something other than UART3
here.
source "board/ti/common/Kconfig"
endif
......@@ -9,15 +9,6 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "dra7xx_evm"
config CONS_INDEX
int "UART used for console"
range 1 6
default 1
help
The DRA7xx (and AM57x) SoC has a total of 6 UARTs available to it.
Depending on your specific board you may want something other than UART1
here.
source "board/ti/common/Kconfig"
endif
......@@ -12,13 +12,4 @@ config SYS_SOC
config SYS_CONFIG_NAME
default "baltos"
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
in documentation, etc) available to it. Depending on your specific
board you may want something other than UART0.
endif
......@@ -16,5 +16,6 @@ CONFIG_SPL_I2C_SUPPORT=y
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_SUN4I_EMAC=y
CONFIG_AXP152_POWER=y
CONFIG_CONS_INDEX=2
CONFIG_USB_EHCI_HCD=y
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
......@@ -18,5 +18,6 @@ CONFIG_SPL=y
# CONFIG_SPL_ISO_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_SUNXI_NO_PMIC=y
CONFIG_CONS_INDEX=2
CONFIG_USB_EHCI_HCD=y
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
......@@ -24,6 +24,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
# CONFIG_SPL_PARTITION_UUIDS is not set
CONFIG_DFU_RAM=y
CONFIG_AXP_ALDO3_VOLT=3300
CONFIG_CONS_INDEX=2
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_MUSB_GADGET=y
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_CONS_INDEX=1
CONFIG_MACH_SUN8I_A33=y
CONFIG_DRAM_CLK=432
CONFIG_DRAM_ZQ=15291
......
......@@ -20,5 +20,6 @@ CONFIG_SPL_I2C_SUPPORT=y
# CONFIG_SPL_DOS_PARTITION is not set
# CONFIG_SPL_ISO_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_CONS_INDEX=2
CONFIG_USB_MUSB_HOST=y
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
......@@ -14,5 +14,6 @@ CONFIG_SPL_I2C_SUPPORT=y
# CONFIG_SPL_ISO_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_AXP152_POWER=y
CONFIG_CONS_INDEX=2
CONFIG_USB_EHCI_HCD=y
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment