All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trevor Woerner <twoerner@gmail.com>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Vladimir Zapolskiy <vz@mleia.com>,
	Albert ARIBAUD <albert.aribaud@3adev.fr>,
	Simon Glass <sjg@chromium.org>, Adam Ford <aford173@gmail.com>,
	Stefan Roese <sr@denx.de>,
	Patrick Delaunay <patrick.delaunay@foss.st.com>,
	Michal Simek <michal.simek@xilinx.com>
Subject: [PATCH v2 1/8] lpc32xx: Kconfig: switch to CONFIG_CONS_INDEX
Date: Thu, 10 Jun 2021 22:37:02 -0400	[thread overview]
Message-ID: <20210611023710.35203-1-twoerner@gmail.com> (raw)

There's nothing special or unique to the lpc32xx that requires its own config
parameter for specifying the console uart index. Therefore instead of using
the lpc32xx-specific CONFIG_SYS_LPC32XX_UART include parameter, use the
already-available CONFIG_CONS_INDEX from Kconfig.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---

(no changes since v1)

 arch/arm/include/asm/arch-lpc32xx/config.h       | 4 ++--
 arch/arm/mach-lpc32xx/devices.c                  | 3 +--
 board/timll/devkit3250/devkit3250.c              | 2 +-
 board/timll/devkit3250/devkit3250_spl.c          | 2 +-
 board/work-microwave/work_92105/work_92105.c     | 2 +-
 board/work-microwave/work_92105/work_92105_spl.c | 2 +-
 configs/devkit3250_defconfig                     | 2 ++
 configs/work_92105_defconfig                     | 2 ++
 include/configs/devkit3250.h                     | 5 -----
 include/configs/work_92105.h                     | 5 -----
 scripts/config_whitelist.txt                     | 1 -
 11 files changed, 11 insertions(+), 19 deletions(-)

diff --git a/arch/arm/include/asm/arch-lpc32xx/config.h b/arch/arm/include/asm/arch-lpc32xx/config.h
index 0836091af2..45e46f9946 100644
--- a/arch/arm/include/asm/arch-lpc32xx/config.h
+++ b/arch/arm/include/asm/arch-lpc32xx/config.h
@@ -12,8 +12,8 @@
 /* Basic CPU architecture */
 
 /* UART configuration */
-#if	(CONFIG_SYS_LPC32XX_UART == 1) || (CONFIG_SYS_LPC32XX_UART == 2) || \
-	(CONFIG_SYS_LPC32XX_UART == 7)
+#if	(CONFIG_CONS_INDEX == 1) || (CONFIG_CONS_INDEX == 2) || \
+	(CONFIG_CONS_INDEX == 7)
 #if !defined(CONFIG_LPC32XX_HSUART)
 #define CONFIG_LPC32XX_HSUART
 #endif
diff --git a/arch/arm/mach-lpc32xx/devices.c b/arch/arm/mach-lpc32xx/devices.c
index e1e2e0d094..0a4fef295a 100644
--- a/arch/arm/mach-lpc32xx/devices.c
+++ b/arch/arm/mach-lpc32xx/devices.c
@@ -23,8 +23,7 @@ void lpc32xx_uart_init(unsigned int uart_id)
 		return;
 
 	/* Disable loopback mode, if it is set by S1L bootloader */
-	clrbits_le32(&ctrl->loop,
-		     UART_LOOPBACK(CONFIG_SYS_LPC32XX_UART));
+	clrbits_le32(&ctrl->loop, UART_LOOPBACK(uart_id));
 
 	if (uart_id < 3 || uart_id > 6)
 		return;
diff --git a/board/timll/devkit3250/devkit3250.c b/board/timll/devkit3250/devkit3250.c
index 3c744b943f..9d4ffb0f97 100644
--- a/board/timll/devkit3250/devkit3250.c
+++ b/board/timll/devkit3250/devkit3250.c
@@ -38,7 +38,7 @@ void reset_periph(void)
 
 int board_early_init_f(void)
 {
-	lpc32xx_uart_init(CONFIG_SYS_LPC32XX_UART);
+	lpc32xx_uart_init(CONFIG_CONS_INDEX);
 	lpc32xx_i2c_init(1);
 	lpc32xx_i2c_init(2);
 	lpc32xx_ssp_init();
diff --git a/board/timll/devkit3250/devkit3250_spl.c b/board/timll/devkit3250/devkit3250_spl.c
index 47af78ae0b..12e8ae9c39 100644
--- a/board/timll/devkit3250/devkit3250_spl.c
+++ b/board/timll/devkit3250/devkit3250_spl.c
@@ -49,7 +49,7 @@ void spl_board_init(void)
 	/* First of all silence buzzer controlled by GPO_20 */
 	writel((1 << 20), &gpio->p3_outp_clr);
 
-	lpc32xx_uart_init(CONFIG_SYS_LPC32XX_UART);
+	lpc32xx_uart_init(CONFIG_CONS_INDEX);
 	preloader_console_init();
 
 	ddr_init(&dram_64mb);
diff --git a/board/work-microwave/work_92105/work_92105.c b/board/work-microwave/work_92105/work_92105.c
index bdcecff730..5d12f84cfe 100644
--- a/board/work-microwave/work_92105/work_92105.c
+++ b/board/work-microwave/work_92105/work_92105.c
@@ -37,7 +37,7 @@ void reset_periph(void)
 int board_early_init_f(void)
 {
 	/* initialize serial port for console */
-	lpc32xx_uart_init(CONFIG_SYS_LPC32XX_UART);
+	lpc32xx_uart_init(CONFIG_CONS_INDEX);
 	/* enable I2C, SSP, MAC, NAND */
 	lpc32xx_i2c_init(1); /* only I2C1 has devices, I2C2 has none */
 	lpc32xx_ssp_init();
diff --git a/board/work-microwave/work_92105/work_92105_spl.c b/board/work-microwave/work_92105/work_92105_spl.c
index a31553a2d2..d9401145f2 100644
--- a/board/work-microwave/work_92105/work_92105_spl.c
+++ b/board/work-microwave/work_92105/work_92105_spl.c
@@ -58,7 +58,7 @@ const struct emc_dram_settings dram_128mb = {
 void spl_board_init(void)
 {
 	/* initialize serial port for console */
-	lpc32xx_uart_init(CONFIG_SYS_LPC32XX_UART);
+	lpc32xx_uart_init(CONFIG_CONS_INDEX);
 	/* initialize console */
 	preloader_console_init();
 	/* init DDR and NAND to chainload U-Boot */
diff --git a/configs/devkit3250_defconfig b/configs/devkit3250_defconfig
index 93c048cee8..9ae70f7d46 100644
--- a/configs/devkit3250_defconfig
+++ b/configs/devkit3250_defconfig
@@ -51,6 +51,8 @@ CONFIG_PHYLIB=y
 CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_ADDR=31
 CONFIG_PHY_SMSC=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_CONS_INDEX=5
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_USB=y
diff --git a/configs/work_92105_defconfig b/configs/work_92105_defconfig
index c3f666dcfe..e9605adedd 100644
--- a/configs/work_92105_defconfig
+++ b/configs/work_92105_defconfig
@@ -48,5 +48,7 @@ CONFIG_MTD_RAW_NAND=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_SMSC=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_CONS_INDEX=5
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
diff --git a/include/configs/devkit3250.h b/include/configs/devkit3250.h
index 5d2b77b4a3..921a38c01e 100644
--- a/include/configs/devkit3250.h
+++ b/include/configs/devkit3250.h
@@ -30,11 +30,6 @@
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + SZ_4K \
 					 - GENERATED_GBL_DATA_SIZE)
 
-/*
- * Serial Driver
- */
-#define CONFIG_SYS_LPC32XX_UART		5   /* UART5 */
-
 /*
  * DMA
  */
diff --git a/include/configs/work_92105.h b/include/configs/work_92105.h
index 7874b77f3f..076a1b065e 100644
--- a/include/configs/work_92105.h
+++ b/include/configs/work_92105.h
@@ -35,11 +35,6 @@
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + SZ_512K \
 					 - GENERATED_GBL_DATA_SIZE)
 
-/*
- * Serial Driver
- */
-#define CONFIG_SYS_LPC32XX_UART		5   /* UART5 - NS16550 */
-
 /*
  * Ethernet Driver
  */
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 0f5ac8ff52..13281bf6b1 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -2735,7 +2735,6 @@ CONFIG_SYS_LOW
 CONFIG_SYS_LOWMEM_BASE
 CONFIG_SYS_LOW_RES_TIMER
 CONFIG_SYS_LPAE_SDRAM_BASE
-CONFIG_SYS_LPC32XX_UART
 CONFIG_SYS_LS1_DDR_BLOCK1_SIZE
 CONFIG_SYS_LS_MC_AIOP_IMG_MAX_LENGTH
 CONFIG_SYS_LS_MC_BOOT_TIMEOUT_MS
-- 
2.30.0.rc0


             reply	other threads:[~2021-06-11  2:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11  2:37 Trevor Woerner [this message]
2021-06-11  2:37 ` [PATCH v2 2/8] lpc32xx: import device tree from Linux Trevor Woerner
2021-06-11  2:37 ` [PATCH v2 3/8] arm: lpc32xx: add EA LPC3250 DevKitv2 board support Trevor Woerner
2021-06-11  2:37 ` [PATCH v2 4/8] lpc32xx: i2c: remove unused define Trevor Woerner
2021-06-11  2:37 ` [PATCH v2 5/8] lpc32xx: i2c: fix base address Trevor Woerner
2021-06-11  2:37 ` [PATCH v2 6/8] lpc32xx: i2c: finish DM/OF code Trevor Woerner
2021-06-11  2:37 ` [PATCH v2 7/8] Kconfig: convert CONFIG_SYS_I2C_LPC32XX Trevor Woerner
2021-06-26 18:30   ` Simon Glass
2021-06-11  2:37 ` [PATCH v2 8/8] lpc32xx: ea-lpc3250devkitv2: enable i2c (DM) Trevor Woerner
2021-06-26 18:30 ` [PATCH v2 1/8] lpc32xx: Kconfig: switch to CONFIG_CONS_INDEX Simon Glass
2021-07-06 22:50 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210611023710.35203-1-twoerner@gmail.com \
    --to=twoerner@gmail.com \
    --cc=aford173@gmail.com \
    --cc=albert.aribaud@3adev.fr \
    --cc=michal.simek@xilinx.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=sjg@chromium.org \
    --cc=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=vz@mleia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.