Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E4B45C4332F for ; Sun, 18 Dec 2022 12:27:28 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EE251853A2; Sun, 18 Dec 2022 13:27:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=posteo.net 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; secure) header.d=posteo.net header.i=@posteo.net header.b="ptQl+re+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AE562853AA; Sun, 18 Dec 2022 13:27:25 +0100 (CET) Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5159A85390 for ; Sun, 18 Dec 2022 13:27:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=posteo.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=stefan_b@posteo.net Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0355624002A for ; Sun, 18 Dec 2022 13:27:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1671366443; bh=pf/GV1NgBAai9L2tAPv5+6pwSbbTmN/YjNeAqIpk1vo=; h=From:To:Cc:Subject:Date:From; b=ptQl+re+E7g6AZ8btWLAsao3OR8mHS47u/6rlDQfbKUnH1akg4LWTnms+ec+/zI2n J9S61vVMa0XCOjX4YEDMZ4Fy3X6otCarcqih9iix+Q4ebx5jdt8+MLraPqonFmx68b 0wRd1vFJzdA+M7ezeHCB4YWM2vU17m4DmMBhJ3aQTm1zTPqh+pF+8TX/fc1yIQKX3h EwLb0JslLoVBGRtaZFw+uj3shWVlMxhYh0CRUZD3gRJ/MhbAert71OZplNqeD7C35W FkIra4sS0WWKLT1K0nGMm2Q4hA8CZi+B2bIUQs9aTQUNB4CWmAcP+HO6sGDJkbeSCZ 6KNbjMSmy5igw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NZhtL3fWpz6tmJ; Sun, 18 Dec 2022 13:27:22 +0100 (CET) From: Stefan Bosch To: trini@konsulko.com Cc: u-boot@lists.denx.de, Stefan Bosch Subject: [PATCH v1 4/4] arm: s5p4418: dm_serial: remove old code / add DEBUG_UART Date: Sun, 18 Dec 2022 12:26:47 +0000 Message-Id: <20221218122647.5210-1-stefan_b@posteo.net> In-Reply-To: <20221218115305.4508-1-stefan_b@posteo.net> References: <20221218115305.4508-1-stefan_b@posteo.net> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean Remove init of UART-clock and UART-reset in arch_cpu_init(). Add DEBUG_UART to s5p4418_nanopi2_defconfig. Signed-off-by: Stefan Bosch --- arch/arm/cpu/armv7/s5p4418/cpu.c | 29 ----------------------------- arch/arm/mach-nexell/clock.c | 2 +- configs/s5p4418_nanopi2_defconfig | 8 +++++++- include/configs/s5p4418_nanopi2.h | 8 +++----- 4 files changed, 11 insertions(+), 36 deletions(-) diff --git a/arch/arm/cpu/armv7/s5p4418/cpu.c b/arch/arm/cpu/armv7/s5p4418/cpu.c index 3baa761ec7..fcaafc0ff7 100644 --- a/arch/arm/cpu/armv7/s5p4418/cpu.c +++ b/arch/arm/cpu/armv7/s5p4418/cpu.c @@ -13,10 +13,8 @@ #include #include #include -#include #include #include -#include DECLARE_GLOBAL_DATA_PTR; @@ -45,39 +43,12 @@ static void cpu_soc_init(void) nx_tieoff_set(NX_TIEOFF_CORTEXA9MP_TOP_QUADL2C_L2RET1N_1, 1); } -#ifdef CONFIG_PL011_SERIAL -static void serial_device_init(void) -{ - char dev[10]; - int id; - - sprintf(dev, "nx-uart.%d", CONFIG_CONS_INDEX); - id = RESET_ID_UART0 + CONFIG_CONS_INDEX; - - struct clk *clk = clk_get((const char *)dev); - - /* reset control: Low active ___|--- */ - nx_rstcon_setrst(id, RSTCON_ASSERT); - udelay(10); - nx_rstcon_setrst(id, RSTCON_NEGATE); - udelay(10); - - /* set clock */ - clk_disable(clk); - clk_set_rate(clk, CONFIG_PL011_CLOCK); - clk_enable(clk); -} -#endif - int arch_cpu_init(void) { flush_dcache_all(); cpu_soc_init(); clk_init(); - if (IS_ENABLED(CONFIG_PL011_SERIAL)) - serial_device_init(); - return 0; } diff --git a/arch/arm/mach-nexell/clock.c b/arch/arm/mach-nexell/clock.c index 24fa204ccd..59ffa26255 100644 --- a/arch/arm/mach-nexell/clock.c +++ b/arch/arm/mach-nexell/clock.c @@ -856,7 +856,7 @@ void __init clk_init(void) } /* prevent uart clock disable for low step debug message */ - #ifndef CONFIG_DEBUG_NX_UART + #ifndef CONFIG_DEBUG_UART if (peri->dev_name) { #ifdef CONFIG_BACKLIGHT_PWM if (!strcmp(peri->dev_name, DEV_NAME_PWM)) diff --git a/configs/s5p4418_nanopi2_defconfig b/configs/s5p4418_nanopi2_defconfig index f3a316513c..042037acfc 100644 --- a/configs/s5p4418_nanopi2_defconfig +++ b/configs/s5p4418_nanopi2_defconfig @@ -54,7 +54,7 @@ CONFIG_MMC_DW=y CONFIG_PINCTRL=y CONFIG_DM_PMIC=y CONFIG_DM_REGULATOR=y -CONFIG_CONS_INDEX=0 + CONFIG_DM_VIDEO=y CONFIG_VIDEO_LOGO=y CONFIG_DISPLAY=y @@ -67,3 +67,9 @@ CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_SPLASH_SOURCE=y CONFIG_BMP_24BPP=y CONFIG_ERRNO_STR=y + +CONFIG_DEBUG_UART=y +CONFIG_DEBUG_UART_PL011=y +CONFIG_DEBUG_UART_BASE=0xC00A1000 +CONFIG_DEBUG_UART_CLOCK=150000000 +CONFIG_DEBUG_UART_SKIP_INIT=y diff --git a/include/configs/s5p4418_nanopi2.h b/include/configs/s5p4418_nanopi2.h index ae94f0ecc5..a6d3957dc1 100644 --- a/include/configs/s5p4418_nanopi2.h +++ b/include/configs/s5p4418_nanopi2.h @@ -78,11 +78,9 @@ /*----------------------------------------------------------------------- * serial console configuration */ -#define CONFIG_PL011_CLOCK 50000000 -#define CONFIG_PL01x_PORTS {(void *)PHY_BASEADDR_UART0, \ - (void *)PHY_BASEADDR_UART1, \ - (void *)PHY_BASEADDR_UART2, \ - (void *)PHY_BASEADDR_UART3} + +/* 150MHz is the clock rate set by SPL (uart0) */ +#define CONFIG_PL011_CLOCK 150000000 /*----------------------------------------------------------------------- * BACKLIGHT -- 2.17.1