From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 082A1C47082 for ; Mon, 7 Jun 2021 04:34:01 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 14801610FC for ; Mon, 7 Jun 2021 04:34:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14801610FC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 852BA82D1C; Mon, 7 Jun 2021 06:33:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OEI7aL6L"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A7B0982D4E; Mon, 7 Jun 2021 06:33:50 +0200 (CEST) Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CE820808C5 for ; Mon, 7 Jun 2021 06:33:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=twoerner@gmail.com Received: by mail-qk1-x72e.google.com with SMTP id i68so11912715qke.3 for ; Sun, 06 Jun 2021 21:33:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ahT01FiPG9KGus7UujHsfZzXtvowg58Q2XdDzNpCgyA=; b=OEI7aL6LRi/T2EIfvGTA9VHILSxjAwdZVjuROaJSoL0KmMTc6tO5Si8NsMqp0+i27X jjKm3gLbHx32KVuISaKM1KOeNK7dfHeOR2tyw8B/K2PKM6FIdrt1CBT5QoJc+rxJ/1wf g0GjopyvRrYCHQfg+dun5TqIJGvr5YQbcZm+k36LcHZcFmQyRX8Q3UEqmIeKo76ZjD7D XEd085WQbsegMZHRKEKRdSLIMyEimlSo0xPps58yPADcVAg6I+bP69BQKrKjAX3zZ6Hc b/FR6Rs9VejVEufgn/j1kwyTFaqUR5K4rw3dXFwGC0c7/G861qG8a8l5NWPgF0goSjPK FSFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ahT01FiPG9KGus7UujHsfZzXtvowg58Q2XdDzNpCgyA=; b=VTBbpSLd1mTPDuy91N001OhfzrGSL/y3sGATN7u9WUl2a4bniMRxdHKzc5JGdE5jVA APQ7Zw17phYMDZT8jE8Y37lzFC0LDxkCcWSJJtqRp0Mf4t155EVF6OR7HFl0Yj1cXaQM iq5H8huYJJJv1DmxjXIngyPwOGwNd+pfdaR5bsfrp/fdz5xBh7EODfjVIUzR/QvYS2L1 qxePcGBHqXFOQBRXAxTGk06MaWz18jnCCptnnEYp0ukEeF43C47rFvub3QktsDmOyEOf aVBPt6vQLCP1ELsUqJn8C9M90QyCGG2q1M1RHMTH2IxV1VmSDAGGG3/p693Y14eE7MMQ OG7w== X-Gm-Message-State: AOAM531xD8rbzpH7MeVJzeTTPjAAhljp1NaB/087FT7T2w0RdsKD1pVo nPqvMYPkBudkTNuLeMhb5ErKlX8bnr+7Iw== X-Google-Smtp-Source: ABdhPJzOoqysykuumDuFN+DgoOh91avVTLcj7b+UOjLbklGqKPmMTAN03VqbG/iq+lsZtyHPTVadAg== X-Received: by 2002:a37:a8c8:: with SMTP id r191mr14756093qke.394.1623040425215; Sun, 06 Jun 2021 21:33:45 -0700 (PDT) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id v25sm8325331qtf.68.2021.06.06.21.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Jun 2021 21:33:44 -0700 (PDT) From: Trevor Woerner To: U-Boot Mailing List Cc: Vladimir Zapolskiy , Albert ARIBAUD , Simon Glass , Adam Ford , Stefan Roese , Patrick Delaunay , Michal Simek Subject: [PATCH v1 1/3] lpc32xx: Kconfig: switch to CONFIG_CONS_INDEX Date: Mon, 7 Jun 2021 00:33:22 -0400 Message-Id: <20210607043324.3005-2-twoerner@gmail.com> X-Mailer: git-send-email 2.30.0.rc0 In-Reply-To: <20210607043324.3005-1-twoerner@gmail.com> References: <20210607043324.3005-1-twoerner@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean 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 --- 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 8f92b82719..00a58d65fc 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -2737,7 +2737,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