Skip to content

Commit

Permalink
Convert all of CONFIG_CONS_INDEX to Kconfig
Browse files Browse the repository at this point in the history
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: Adam Ford <[email protected]>
[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 <[email protected]>
  • Loading branch information
trini committed Mar 16, 2018
1 parent 7dc7a38 commit 6f6b7cf
Show file tree
Hide file tree
Showing 320 changed files with 181 additions and 281 deletions.
2 changes: 2 additions & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion arch/arm/include/asm/arch-bcmcygnus/configs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
1 change: 0 additions & 1 deletion arch/arm/include/asm/arch-bcmnsp/configs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
6 changes: 0 additions & 6 deletions arch/arm/include/asm/arch-lpc32xx/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down
4 changes: 4 additions & 0 deletions arch/arm/mach-omap2/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ 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
ARM core and more.

config TI816X
bool "TI816X SoC"
select SPECIFY_CONSOLE_INDEX
imply NAND_OMAP_ELM
imply NAND_OMAP_GPMC
help
Expand All @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions arch/arm/mach-sunxi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down Expand Up @@ -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)"
Expand All @@ -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)"
Expand Down
10 changes: 0 additions & 10 deletions board/birdland/bav335x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 0 additions & 16 deletions board/eets/pdu001/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions board/hisilicon/hikey/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 0 additions & 10 deletions board/tcl/sl50/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 0 additions & 10 deletions board/ti/am335x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions board/ti/am57xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 0 additions & 9 deletions board/ti/dra7xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 0 additions & 9 deletions board/vscom/baltos/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions configs/A10s-OLinuXino-M_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions configs/A13-OLinuXinoM_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions configs/A13-OLinuXino_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion configs/A33-OLinuXino_defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_CONS_INDEX=1
CONFIG_MACH_SUN8I_A33=y
CONFIG_DRAM_CLK=432
CONFIG_DRAM_ZQ=15291
Expand Down
1 change: 1 addition & 0 deletions configs/Ampe_A76_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions configs/Auxtek-T003_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions configs/Auxtek-T004_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,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
1 change: 0 additions & 1 deletion configs/Bananapi_m2m_defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_CONS_INDEX=1
CONFIG_MACH_SUN8I_A33=y
CONFIG_DRAM_CLK=600
CONFIG_DRAM_ZQ=15291
Expand Down
1 change: 1 addition & 0 deletions configs/CHIP_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ CONFIG_DFU_RAM=y
# CONFIG_MMC is not set
CONFIG_AXP_ALDO3_VOLT=3300
CONFIG_AXP_ALDO4_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
1 change: 1 addition & 0 deletions configs/CHIP_pro_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ CONFIG_NAND=y
CONFIG_NAND_SUNXI=y
CONFIG_AXP_ALDO3_VOLT=3300
CONFIG_AXP_ALDO4_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
Expand Down
1 change: 1 addition & 0 deletions configs/Empire_electronix_d709_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,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
1 change: 1 addition & 0 deletions configs/Empire_electronix_m712_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions configs/MPC8541CDS_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ CONFIG_BOOTP_HOSTNAME=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
CONFIG_PHYLIB=y
CONFIG_CONS_INDEX=2
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
1 change: 1 addition & 0 deletions configs/MPC8541CDS_legacy_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ CONFIG_BOOTP_HOSTNAME=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
CONFIG_PHYLIB=y
CONFIG_CONS_INDEX=2
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
1 change: 1 addition & 0 deletions configs/MPC8548CDS_36BIT_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ CONFIG_PHYLIB=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_CONS_INDEX=2
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
1 change: 1 addition & 0 deletions configs/MPC8548CDS_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ CONFIG_PHYLIB=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_CONS_INDEX=2
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
1 change: 1 addition & 0 deletions configs/MPC8548CDS_legacy_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ CONFIG_PHYLIB=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_CONS_INDEX=2
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
1 change: 1 addition & 0 deletions configs/MPC8555CDS_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ CONFIG_BOOTP_HOSTNAME=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
CONFIG_PHYLIB=y
CONFIG_CONS_INDEX=2
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
1 change: 1 addition & 0 deletions configs/MPC8555CDS_legacy_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ CONFIG_BOOTP_HOSTNAME=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
CONFIG_PHYLIB=y
CONFIG_CONS_INDEX=2
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
1 change: 1 addition & 0 deletions configs/Nintendo_NES_Classic_Edition_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ CONFIG_SPL=y
# CONFIG_MMC is not set
CONFIG_AXP_DLDO1_VOLT=3300
CONFIG_AXP_ELDO2_VOLT=1800
CONFIG_CONS_INDEX=5
CONFIG_USB_MUSB_GADGET=y
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
CONFIG_USB_FUNCTION_MASS_STORAGE=y
1 change: 0 additions & 1 deletion configs/Sinlinx_SinA33_defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_CONS_INDEX=1
CONFIG_MACH_SUN8I_A33=y
CONFIG_DRAM_CLK=552
CONFIG_DRAM_ZQ=15291
Expand Down
1 change: 1 addition & 0 deletions configs/UTOO_P66_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ CONFIG_SPL_I2C_SUPPORT=y
# CONFIG_SPL_ISO_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
CONFIG_CONS_INDEX=2
CONFIG_USB_MUSB_HOST=y
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
1 change: 1 addition & 0 deletions configs/Wobo_i5_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ CONFIG_SPL_I2C_SUPPORT=y
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_AXP_ALDO3_VOLT=3300
CONFIG_AXP_ALDO4_VOLT=3300
CONFIG_CONS_INDEX=2
CONFIG_USB_EHCI_HCD=y
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
Loading

0 comments on commit 6f6b7cf

Please sign in to comment.