Skip to contentSkip to conversation

ARM: imx: imx8q: Use LPUART_BASE macro in config files

PATCH In review Marek Vasut 2 participants 2 messages Apr 24, 2022 – Apr 25, 2022 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: imx: imx8q: Use LPUART_BASE macro in config files

Replace ad-hoc value with LPUART_BASE macro, no functional change.

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
Cc Tom Rini <[email protected]>
---
 include/configs/cgtqmx8.h     | 2 +-
 include/configs/imx8qm_mek.h  | 4 ++--
 include/configs/imx8qxp_mek.h | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
include/configs/cgtqmx8.h +1 -1
index 6da0483ef09..db2555c23cc 100644
@@ -20,7 +20,7 @@
 #define CONFIG_SPL_BSS_MAX_SIZE		0x1000	/* 4 KB */
 #define CONFIG_SYS_SPL_MALLOC_START	0x00120000
 #define CONFIG_SYS_SPL_MALLOC_SIZE	0x3000	/* 12 KB */
-#define CONFIG_SERIAL_LPUART_BASE	0x5a060000
+#define CONFIG_SERIAL_LPUART_BASE	LPUART_BASE
 #define CONFIG_MALLOC_F_ADDR		0x00120000
 
 #define CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE
include/configs/imx8qm_mek.h +2 -2
index 61d56e269ac..b9ad61ce501 100644
@@ -21,7 +21,7 @@
 #define CONFIG_SPL_BSS_MAX_SIZE		0x1000	/* 4 KB */
 #define CONFIG_SYS_SPL_MALLOC_START	0x00120000
 #define CONFIG_SYS_SPL_MALLOC_SIZE	0x3000	/* 12 KB */
-#define CONFIG_SERIAL_LPUART_BASE	0x5a060000
+#define CONFIG_SERIAL_LPUART_BASE	LPUART_BASE
 #define CONFIG_MALLOC_F_ADDR		0x00120000
 
 #define CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE
@@ -41,7 +41,7 @@
 	"script=boot.scr\0" \
 	"image=Image\0" \
 	"panel=NULL\0" \
-	"console=ttyLP0,${baudrate} earlycon=lpuart32,0x5a060000,${baudrate}\0" \
+	"console=ttyLP0,${baudrate} earlycon=lpuart32," __stringify(LPUART_BASE) ",${baudrate}\0" \
 	"fdt_addr=0x83000000\0"			\
 	"fdt_high=0xffffffffffffffff\0"		\
 	"boot_fdt=try\0" \
include/configs/imx8qxp_mek.h +1 -1
index 26dc4ded030..11a8ac50691 100644
@@ -19,7 +19,7 @@
 #define CONFIG_SPL_BSS_MAX_SIZE		0x1000	/* 4 KB */
 #define CONFIG_SYS_SPL_MALLOC_START	0x00120000
 #define CONFIG_SYS_SPL_MALLOC_SIZE	0x3000	/* 12 KB */
-#define CONFIG_SERIAL_LPUART_BASE	0x5a060000
+#define CONFIG_SERIAL_LPUART_BASE	LPUART_BASE
 #define CONFIG_MALLOC_F_ADDR		0x00120000
 
 #define CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE
Signature · 1 line
2.35.1
#1 lore raw
Quoted 53 lines · Marek Vasut

Replace ad-hoc value with LPUART_BASE macro, no functional change.

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
Cc Tom Rini <[email protected]>
---
 include/configs/cgtqmx8.h     | 2 +-
 include/configs/imx8qm_mek.h  | 4 ++--
 include/configs/imx8qxp_mek.h | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
include/configs/cgtqmx8.h +1 -1
index 6da0483ef09..db2555c23cc 100644
@@ -20,7 +20,7 @@
 #define CONFIG_SPL_BSS_MAX_SIZE		0x1000	/* 4 KB */
 #define CONFIG_SYS_SPL_MALLOC_START	0x00120000
 #define CONFIG_SYS_SPL_MALLOC_SIZE	0x3000	/* 12 KB */
-#define CONFIG_SERIAL_LPUART_BASE	0x5a060000
+#define CONFIG_SERIAL_LPUART_BASE	LPUART_BASE
 #define CONFIG_MALLOC_F_ADDR		0x00120000
 
 #define CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE
include/configs/imx8qm_mek.h +2 -2
index 61d56e269ac..b9ad61ce501 100644
@@ -21,7 +21,7 @@
 #define CONFIG_SPL_BSS_MAX_SIZE		0x1000	/* 4 KB */
 #define CONFIG_SYS_SPL_MALLOC_START	0x00120000
 #define CONFIG_SYS_SPL_MALLOC_SIZE	0x3000	/* 12 KB */
-#define CONFIG_SERIAL_LPUART_BASE	0x5a060000
+#define CONFIG_SERIAL_LPUART_BASE	LPUART_BASE
 #define CONFIG_MALLOC_F_ADDR		0x00120000
 
 #define CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE
@@ -41,7 +41,7 @@
 	"script=boot.scr\0" \
 	"image=Image\0" \
 	"panel=NULL\0" \
-	"console=ttyLP0,${baudrate} earlycon=lpuart32,0x5a060000,${baudrate}\0" \
+	"console=ttyLP0,${baudrate} earlycon=lpuart32," __stringify(LPUART_BASE) ",${baudrate}\0" \
 	"fdt_addr=0x83000000\0"			\
 	"fdt_high=0xffffffffffffffff\0"		\
 	"boot_fdt=try\0" \
include/configs/imx8qxp_mek.h +0 -0
index 26dc4ded030..11a8ac50691 100644

include/configs/imx8qxp_mek.h line 25

Quoted 8 lines
include/configs/imx8qxp_mek.h +1 -1
@@ -19,7 +19,7 @@
 #define CONFIG_SPL_BSS_MAX_SIZE		0x1000	/* 4 KB */
 #define CONFIG_SYS_SPL_MALLOC_START	0x00120000
 #define CONFIG_SYS_SPL_MALLOC_SIZE	0x3000	/* 12 KB */
-#define CONFIG_SERIAL_LPUART_BASE	0x5a060000
+#define CONFIG_SERIAL_LPUART_BASE	LPUART_BASE
 #define CONFIG_MALLOC_F_ADDR		0x00120000
 
 #define CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE

This kind of change makes Kconfig migration harder for moveconfig.py to handle. I don't see CONFIG_SERIAL_LPUART_BASE used in code, so we should just drop it. And so far as we're consistent about how to pass earlycon info, we just put the raw address, but I don't strongly object to __stringify(LPUART_BASE) as it is clearer, and handling the default env part of board config.h has its own challenges more broadly.

Signature · 1 line
Tom