Skip to contentSkip to conversation

sunxi: Remove obsolete Kconfig selections

PATCH Applied Samuel Holland 3 participants 7 messages May 9, 2022 – May 24, 2022

Subsystems (3)
lore
Share & tools
lore

Samuel Holland

author maintainer
#0 lore raw

PATCH 1/2 sunxi: Remove obsolete Kconfig selections

ARCH_SUNXI selects DM_SERIAL, so the condition can never be satisfied.

---

 arch/arm/mach-sunxi/Kconfig | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/mach-sunxi/Kconfig +0 -3
index 1f43b25324..ee606c5bbc 100644
@@ -207,7 +207,6 @@ config MACH_SUN5I
 	select PHY_SUN4I_USB
 	select SUNXI_GEN_SUN4I
 	select SUPPORT_SPL
-	imply CONS_INDEX_2 if !DM_SERIAL
 	imply SPL_SYS_I2C_LEGACY
 	imply SYS_I2C_LEGACY
 
@@ -255,7 +254,6 @@ config MACH_SUN8I_A23
 	select SUPPORT_SPL
 	select SYS_I2C_SUN8I_RSB
 	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)"
@@ -270,7 +268,6 @@ config MACH_SUN8I_A33
 	select SUPPORT_SPL
 	select SYS_I2C_SUN8I_RSB
 	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)"
Signature · 1 line
2.35.1
author maintainer
#1 lore raw

PATCH 2/2 serial: Remove obsolete CONS_INDEX_n Kconfig options

These were only ever implied by sunxi platforms, and that usage has been removed. Current practice is to specify CONFIG_CONS_INDEX in each board's defconfig.

---

 drivers/serial/Kconfig | 26 --------------------------
 1 file changed, 26 deletions(-)
drivers/serial/Kconfig +0 -26
index 1e595d0600..71a0591697 100644
@@ -74,36 +74,10 @@ config TPL_SERIAL_PRESENT
 	  This option enables the full UART in TPL, so if is it disabled,
 	  the full UART driver will be omitted, thus saving space.
 
-# Logic to allow us to use the imply keyword to set what the default port
-# should be.  The default is otherwise 1.
-config CONS_INDEX_0
-	bool
-
-config CONS_INDEX_2
-	bool
-
-config CONS_INDEX_3
-	bool
-
-config CONS_INDEX_4
-	bool
-
-config CONS_INDEX_5
-	bool
-
-config CONS_INDEX_6
-	bool
-
 config CONS_INDEX
 	int "UART used for console"
 	depends on SPECIFY_CONSOLE_INDEX
 	range 0 6
-	default 0 if CONS_INDEX_0
-	default 2 if CONS_INDEX_2
-	default 3 if CONS_INDEX_3
-	default 4 if CONS_INDEX_4
-	default 5 if CONS_INDEX_5
-	default 6 if CONS_INDEX_6
 	default 1
 	help
 	  Set this to match the UART number of the serial console.
Signature · 1 line
2.35.1
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] serial: Remove obsolete CONS_INDEX_n Kconfig options

Quoted 5 lines · Samuel Holland

These were only ever implied by sunxi platforms, and that usage has been removed. Current practice is to specify CONFIG_CONS_INDEX in each board's defconfig.

Signature · 1 line
Tom
Acked-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] serial: Remove obsolete CONS_INDEX_n Kconfig options

In reply to Samuel Holland
Quoted 3 lines · On Mon, 9 May 2022 00:10:55 -0500 Samuel Holland <[email protected]> wrote:

These were only ever implied by sunxi platforms, and that usage has been removed. Current practice is to specify CONFIG_CONS_INDEX in each board's defconfig.

Indeed. Verified by creating the .config files for all 160 ARCH_SUNXI _defconfigs, with and without this series: they were identical.

Quoted 1 line

Thanks!
Andre

Quoted 46 lines

---

 drivers/serial/Kconfig | 26 --------------------------
 1 file changed, 26 deletions(-)
drivers/serial/Kconfig +0 -26
index 1e595d0600..71a0591697 100644
@@ -74,36 +74,10 @@ config TPL_SERIAL_PRESENT
 	  This option enables the full UART in TPL, so if is it disabled,
 	  the full UART driver will be omitted, thus saving space.
 
-# Logic to allow us to use the imply keyword to set what the default port
-# should be.  The default is otherwise 1.
-config CONS_INDEX_0
-	bool
-
-config CONS_INDEX_2
-	bool
-
-config CONS_INDEX_3
-	bool
-
-config CONS_INDEX_4
-	bool
-
-config CONS_INDEX_5
-	bool
-
-config CONS_INDEX_6
-	bool
-
 config CONS_INDEX
 	int "UART used for console"
 	depends on SPECIFY_CONSOLE_INDEX
 	range 0 6
-	default 0 if CONS_INDEX_0
-	default 2 if CONS_INDEX_2
-	default 3 if CONS_INDEX_3
-	default 4 if CONS_INDEX_4
-	default 5 if CONS_INDEX_5
-	default 6 if CONS_INDEX_6
 	default 1
 	help
 	  Set this to match the UART number of the serial console.
#4 lore raw

Re: [PATCH 2/2] serial: Remove obsolete CONS_INDEX_n Kconfig options

In reply to Samuel Holland
Quoted 5 lines · On Mon, 9 May 2022 00:10:55 -0500 Samuel Holland <[email protected]> wrote:

These were only ever implied by sunxi platforms, and that usage has been removed. Current practice is to specify CONFIG_CONS_INDEX in each board's defconfig.

Applied to sunxi/master.

Thanks!
Andre

Quoted 46 lines

---

 drivers/serial/Kconfig | 26 --------------------------
 1 file changed, 26 deletions(-)
drivers/serial/Kconfig +0 -26
index 1e595d0600..71a0591697 100644
@@ -74,36 +74,10 @@ config TPL_SERIAL_PRESENT
 	  This option enables the full UART in TPL, so if is it disabled,
 	  the full UART driver will be omitted, thus saving space.
 
-# Logic to allow us to use the imply keyword to set what the default port
-# should be.  The default is otherwise 1.
-config CONS_INDEX_0
-	bool
-
-config CONS_INDEX_2
-	bool
-
-config CONS_INDEX_3
-	bool
-
-config CONS_INDEX_4
-	bool
-
-config CONS_INDEX_5
-	bool
-
-config CONS_INDEX_6
-	bool
-
 config CONS_INDEX
 	int "UART used for console"
 	depends on SPECIFY_CONSOLE_INDEX
 	range 0 6
-	default 0 if CONS_INDEX_0
-	default 2 if CONS_INDEX_2
-	default 3 if CONS_INDEX_3
-	default 4 if CONS_INDEX_4
-	default 5 if CONS_INDEX_5
-	default 6 if CONS_INDEX_6
 	default 1
 	help
 	  Set this to match the UART number of the serial console.
Reviewed-by on v1 1/2
#5 lore raw
In reply to Samuel Holland
Quoted 1 line · On Mon, 9 May 2022 00:10:54 -0500 Samuel Holland <[email protected]> wrote:

ARCH_SUNXI selects DM_SERIAL, so the condition can never be satisfied.

True, and even if !DM_SERIAL would be a thing, it looks odd to begin with.

Quoted 1 line

Cheers,
Andre

Quoted 33 lines

---

 arch/arm/mach-sunxi/Kconfig | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/mach-sunxi/Kconfig +0 -3
index 1f43b25324..ee606c5bbc 100644
@@ -207,7 +207,6 @@ config MACH_SUN5I
 	select PHY_SUN4I_USB
 	select SUNXI_GEN_SUN4I
 	select SUPPORT_SPL
-	imply CONS_INDEX_2 if !DM_SERIAL
 	imply SPL_SYS_I2C_LEGACY
 	imply SYS_I2C_LEGACY
 
@@ -255,7 +254,6 @@ config MACH_SUN8I_A23
 	select SUPPORT_SPL
 	select SYS_I2C_SUN8I_RSB
 	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)"
@@ -270,7 +268,6 @@ config MACH_SUN8I_A33
 	select SUPPORT_SPL
 	select SYS_I2C_SUN8I_RSB
 	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)"
#6 lore raw
In reply to Samuel Holland
Quoted 3 lines · On Mon, 9 May 2022 00:10:54 -0500 Samuel Holland <[email protected]> wrote:

ARCH_SUNXI selects DM_SERIAL, so the condition can never be satisfied.

Applied to sunxi/master.

Thanks!
Andre

Quoted 33 lines

---

 arch/arm/mach-sunxi/Kconfig | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/mach-sunxi/Kconfig +0 -3
index 1f43b25324..ee606c5bbc 100644
@@ -207,7 +207,6 @@ config MACH_SUN5I
 	select PHY_SUN4I_USB
 	select SUNXI_GEN_SUN4I
 	select SUPPORT_SPL
-	imply CONS_INDEX_2 if !DM_SERIAL
 	imply SPL_SYS_I2C_LEGACY
 	imply SYS_I2C_LEGACY
 
@@ -255,7 +254,6 @@ config MACH_SUN8I_A23
 	select SUPPORT_SPL
 	select SYS_I2C_SUN8I_RSB
 	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)"
@@ -270,7 +268,6 @@ config MACH_SUN8I_A33
 	select SUPPORT_SPL
 	select SYS_I2C_SUN8I_RSB
 	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)"