[PATCH 13/22] Convert CONFIG_LPUART et al to Kconfig

Tom Rini trini at konsulko.com
Wed Mar 23 22:20:00 CET 2022


This converts the following to Kconfig:
   CONFIG_LPUART
   CONFIG_LPUART_32B_REG

And note that CONFIG_LPUART_32B_REG is unused in code.

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 configs/ls1021aqds_ddr4_nor_lpuart_defconfig | 2 +-
 configs/ls1021aqds_nor_lpuart_defconfig      | 2 +-
 configs/ls1021atwr_nor_lpuart_defconfig      | 2 +-
 configs/ls1028aqds_tfa_lpuart_defconfig      | 2 +-
 configs/ls1043aqds_lpuart_defconfig          | 2 +-
 configs/ls1046aqds_lpuart_defconfig          | 2 +-
 drivers/serial/Kconfig                       | 4 ++++
 include/configs/ls1021aqds.h                 | 4 +---
 include/configs/ls1021atwr.h                 | 4 +---
 include/configs/ls1028aqds.h                 | 1 -
 include/configs/ls1043aqds.h                 | 5 -----
 include/configs/ls1046aqds.h                 | 1 -
 12 files changed, 12 insertions(+), 19 deletions(-)

diff --git a/configs/ls1021aqds_ddr4_nor_lpuart_defconfig b/configs/ls1021aqds_ddr4_nor_lpuart_defconfig
index aedc12a46939..7766f1244c66 100644
--- a/configs/ls1021aqds_ddr4_nor_lpuart_defconfig
+++ b/configs/ls1021aqds_ddr4_nor_lpuart_defconfig
@@ -20,7 +20,6 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="LPUART"
 CONFIG_DYNAMIC_SYS_CLK_FREQ=y
 CONFIG_BOOTDELAY=3
 CONFIG_SILENT_CONSOLE=y
@@ -88,6 +87,7 @@ CONFIG_SYS_QE_FW_ADDR=0x60940000
 CONFIG_DM_SCSI=y
 CONFIG_DM_SERIAL=y
 CONFIG_FSL_LPUART=y
+CONFIG_LPUART=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
diff --git a/configs/ls1021aqds_nor_lpuart_defconfig b/configs/ls1021aqds_nor_lpuart_defconfig
index 56e00a70b116..43f93f4324dc 100644
--- a/configs/ls1021aqds_nor_lpuart_defconfig
+++ b/configs/ls1021aqds_nor_lpuart_defconfig
@@ -20,7 +20,6 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="LPUART"
 CONFIG_DYNAMIC_SYS_CLK_FREQ=y
 CONFIG_BOOTDELAY=3
 CONFIG_SILENT_CONSOLE=y
@@ -89,6 +88,7 @@ CONFIG_SYS_QE_FW_ADDR=0x60940000
 CONFIG_DM_SCSI=y
 CONFIG_DM_SERIAL=y
 CONFIG_FSL_LPUART=y
+CONFIG_LPUART=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
diff --git a/configs/ls1021atwr_nor_lpuart_defconfig b/configs/ls1021atwr_nor_lpuart_defconfig
index 5bb3175df41a..973b499fc920 100644
--- a/configs/ls1021atwr_nor_lpuart_defconfig
+++ b/configs/ls1021atwr_nor_lpuart_defconfig
@@ -20,7 +20,6 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="LPUART"
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0"
@@ -76,6 +75,7 @@ CONFIG_SYS_QE_FW_ADDR=0x60940000
 CONFIG_DM_SCSI=y
 CONFIG_DM_SERIAL=y
 CONFIG_FSL_LPUART=y
+CONFIG_LPUART=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
diff --git a/configs/ls1028aqds_tfa_lpuart_defconfig b/configs/ls1028aqds_tfa_lpuart_defconfig
index 1d0e303da2e1..0f4a33c66d1e 100644
--- a/configs/ls1028aqds_tfa_lpuart_defconfig
+++ b/configs/ls1028aqds_tfa_lpuart_defconfig
@@ -22,7 +22,6 @@ CONFIG_MP=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="LPUART"
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 ramdisk_size=0x2000000 default_hugepagesz=2m hugepagesz=2m hugepages=256 video=1920x1080-32 at 60 cma=256M"
@@ -90,6 +89,7 @@ CONFIG_DM_SCSI=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_FSL_LPUART=y
+CONFIG_LPUART=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_FSL_DSPI=y
diff --git a/configs/ls1043aqds_lpuart_defconfig b/configs/ls1043aqds_lpuart_defconfig
index d583573f1794..105fc5a0d891 100644
--- a/configs/ls1043aqds_lpuart_defconfig
+++ b/configs/ls1043aqds_lpuart_defconfig
@@ -25,7 +25,6 @@ CONFIG_REMAKE_ELF=y
 CONFIG_MP=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
-CONFIG_SYS_EXTRA_OPTIONS="LPUART"
 CONFIG_DYNAMIC_SYS_CLK_FREQ=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTARGS=y
@@ -92,6 +91,7 @@ CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
 CONFIG_DM_SCSI=y
 CONFIG_DM_SERIAL=y
 CONFIG_FSL_LPUART=y
+CONFIG_LPUART=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_USB=y
diff --git a/configs/ls1046aqds_lpuart_defconfig b/configs/ls1046aqds_lpuart_defconfig
index 282cb435007d..47636f10e214 100644
--- a/configs/ls1046aqds_lpuart_defconfig
+++ b/configs/ls1046aqds_lpuart_defconfig
@@ -25,7 +25,6 @@ CONFIG_REMAKE_ELF=y
 CONFIG_MP=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
-CONFIG_SYS_EXTRA_OPTIONS="LPUART"
 CONFIG_DYNAMIC_SYS_CLK_FREQ=y
 CONFIG_BOOTDELAY=10
 CONFIG_USE_BOOTARGS=y
@@ -93,6 +92,7 @@ CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
 CONFIG_DM_SCSI=y
 CONFIG_DM_SERIAL=y
 CONFIG_FSL_LPUART=y
+CONFIG_LPUART=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_FSL_DSPI=y
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 345d1881f552..610f8062c76b 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -647,6 +647,10 @@ config FSL_LPUART
 	  Select this to enable a Low Power UART for Freescale VF610 and
 	  QorIQ Layerscape devices.
 
+config LPUART
+	bool "Use the LPUART as console"
+	depends on FSL_LPUART
+
 config MVEBU_A3700_UART
 	bool "UART support for Armada 3700"
 	help
diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
index 91e73c7d4569..b97d2ea05f84 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -268,9 +268,7 @@
 /*
  * Serial Port
  */
-#ifdef CONFIG_LPUART
-#define CONFIG_LPUART_32B_REG
-#else
+#ifndef CONFIG_LPUART
 #define CONFIG_SYS_NS16550_SERIAL
 #ifndef CONFIG_DM_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE	1
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index f5d40aa3023b..8e5f6a560cf2 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -165,9 +165,7 @@
 /*
  * Serial Port
  */
-#ifdef CONFIG_LPUART
-#define CONFIG_LPUART_32B_REG
-#else
+#ifndef CONFIG_LPUART
 #define CONFIG_SYS_NS16550_SERIAL
 #ifndef CONFIG_DM_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE	1
diff --git a/include/configs/ls1028aqds.h b/include/configs/ls1028aqds.h
index 1b4d181310fa..843cd5991500 100644
--- a/include/configs/ls1028aqds.h
+++ b/include/configs/ls1028aqds.h
@@ -66,7 +66,6 @@
 
 /* LPUART */
 #ifdef CONFIG_LPUART
-#define CONFIG_LPUART_32B_REG
 #define CFG_LPUART_MUX_MASK	0xf0
 #define CFG_LPUART_EN		0xf0
 #endif
diff --git a/include/configs/ls1043aqds.h b/include/configs/ls1043aqds.h
index e9919cd05f7a..bc02ac5ccb69 100644
--- a/include/configs/ls1043aqds.h
+++ b/include/configs/ls1043aqds.h
@@ -39,11 +39,6 @@
 #define QSGMII_CARD_PORT4_PHY_ADDR_S2 0xB
 #endif
 
-/* LPUART */
-#ifdef CONFIG_LPUART
-#define CONFIG_LPUART_32B_REG
-#endif
-
 /* SATA */
 
 /* EEPROM */
diff --git a/include/configs/ls1046aqds.h b/include/configs/ls1046aqds.h
index 2972e3beac22..ce68d3f929fc 100644
--- a/include/configs/ls1046aqds.h
+++ b/include/configs/ls1046aqds.h
@@ -54,7 +54,6 @@
 
 /* LPUART */
 #ifdef CONFIG_LPUART
-#define CONFIG_LPUART_32B_REG
 #define CFG_UART_MUX_MASK	0x6
 #define CFG_UART_MUX_SHIFT	1
 #define CFG_LPUART_EN		0x2
-- 
2.25.1



More information about the U-Boot mailing list