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=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 3960DC433E0 for ; Thu, 6 Aug 2020 18:42:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 82159221E2 for ; Thu, 6 Aug 2020 18:42:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596739339; bh=apFcycz/O6DDKT5iJ4SnSfgBjc6oT0XDJlH7NQkB7HA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=froi77rkt0vjAPwvZgnNB7pvPWtgDBBv7GP4dVZTQ66ERBy2Q9LLanxXI5T8XC6gs Gm0gpf70XnLlPlDTkaMi58UKRMPoji9GtrQz2BSd+Itp498HIAQ7Z46DuhlBSGTdsM WRY8fRo9hpfyiidirBjoTLo0jYUy79bq5JFRU9U0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728037AbgHFSl7 (ORCPT ); Thu, 6 Aug 2020 14:41:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:51364 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728368AbgHFSXc (ORCPT ); Thu, 6 Aug 2020 14:23:32 -0400 Received: from localhost.localdomain (unknown [194.230.155.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 38FE022D07; Thu, 6 Aug 2020 18:22:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596738142; bh=apFcycz/O6DDKT5iJ4SnSfgBjc6oT0XDJlH7NQkB7HA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tkd5XZmKI9D0TfLj3IIwE7AoFaSbzXVHqlCJGeuNO1nUNoY7SpZQ1eFehbh1pWTnM ryXCTDP13QexBPF9tKlsF4GCLvCK8Y31mKvwJJPqhjcKb5It0oGVlCEkPFcrdTL8dc 9OE8YCKKrmpGSgj8t4hg8AskNCoVCdrq8EhG4PiI= From: Krzysztof Kozlowski To: linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Krzysztof Kozlowski , Russell King , Kukjin Kim , Kyungmin Park , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 11/41] ARM: samsung: remove s3c_pm_debug_init() Date: Thu, 6 Aug 2020 20:20:28 +0200 Message-Id: <20200806182059.2431-11-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200806181932.2253-1-krzk@kernel.org> References: <20200806181932.2253-1-krzk@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann On s3c24xx and s3c64xx, this is just a wrapper around s3c_pm_debug_init_uart(), but this function does not exist on s5pv210, which always uses an empty stub as CONFIG_SAMSUNG_ATAGS is normally not set. In a configuration that supports both s5pv210 and s3c64xx, we would always call the s3c64xx function, which is probably incorrect when running on s5pv210. Remove the function call completely on s5pv210 and skip the wrapper on s3c as a cleanup. As a side-effect, the s3c64xx behavior is now always the same, regardless of whether it is a DT-only configuration or both DT and ATAGS are supported for booting. Signed-off-by: Arnd Bergmann Signed-off-by: Krzysztof Kozlowski --- arch/arm/mach-s3c24xx/include/mach/pm-core.h | 2 ++ arch/arm/mach-s3c64xx/include/mach/pm-core.h | 2 ++ arch/arm/mach-s5pv210/pm.c | 2 -- arch/arm/plat-samsung/include/plat/pm-common.h | 10 ---------- arch/arm/plat-samsung/pm-debug.c | 7 ------- arch/arm/plat-samsung/pm.c | 5 ++--- 6 files changed, 6 insertions(+), 22 deletions(-) diff --git a/arch/arm/mach-s3c24xx/include/mach/pm-core.h b/arch/arm/mach-s3c24xx/include/mach/pm-core.h index 5e4ce89d0158..cd6406820cb1 100644 --- a/arch/arm/mach-s3c24xx/include/mach/pm-core.h +++ b/arch/arm/mach-s3c24xx/include/mach/pm-core.h @@ -15,6 +15,7 @@ static inline void s3c_pm_debug_init_uart(void) { +#ifdef CONFIG_SAMSUNG_PM_DEBUG unsigned long tmp = __raw_readl(S3C2410_CLKCON); /* re-start uart clocks */ @@ -24,6 +25,7 @@ static inline void s3c_pm_debug_init_uart(void) __raw_writel(tmp, S3C2410_CLKCON); udelay(10); +#endif } static inline void s3c_pm_arch_prepare_irqs(void) diff --git a/arch/arm/mach-s3c64xx/include/mach/pm-core.h b/arch/arm/mach-s3c64xx/include/mach/pm-core.h index bbf79ed28583..1c7d179a86f3 100644 --- a/arch/arm/mach-s3c64xx/include/mach/pm-core.h +++ b/arch/arm/mach-s3c64xx/include/mach/pm-core.h @@ -20,6 +20,7 @@ static inline void s3c_pm_debug_init_uart(void) { +#ifdef CONFIG_SAMSUNG_PM_DEBUG u32 tmp = __raw_readl(S3C_PCLK_GATE); /* As a note, since the S3C64XX UARTs generally have multiple @@ -35,6 +36,7 @@ static inline void s3c_pm_debug_init_uart(void) __raw_writel(tmp, S3C_PCLK_GATE); udelay(10); +#endif } static inline void s3c_pm_arch_prepare_irqs(void) diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c index b336df0c57f3..725e6746f345 100644 --- a/arch/arm/mach-s5pv210/pm.c +++ b/arch/arm/mach-s5pv210/pm.c @@ -99,8 +99,6 @@ static int s5pv210_suspend_enter(suspend_state_t state) u32 eint_wakeup_mask = s5pv210_read_eint_wakeup_mask(); int ret; - s3c_pm_debug_init(); - S3C_PMDBG("%s: suspending the system...\n", __func__); S3C_PMDBG("%s: wakeup masks: %08x,%08x\n", __func__, diff --git a/arch/arm/plat-samsung/include/plat/pm-common.h b/arch/arm/plat-samsung/include/plat/pm-common.h index 1268bae04234..467e7c867c46 100644 --- a/arch/arm/plat-samsung/include/plat/pm-common.h +++ b/arch/arm/plat-samsung/include/plat/pm-common.h @@ -69,22 +69,12 @@ struct pm_uart_save { */ extern void s3c_pm_dbg(const char *msg, ...); -/** - * s3c_pm_debug_init() - suspend/resume low level debug initialization. - * @base: Virtual base of UART to use for suspend/resume debugging. - * - * This function needs to be called before S3C_PMDBG() can be used, to set up - * UART port base address and configuration. - */ -extern void s3c_pm_debug_init(void); - #define S3C_PMDBG(fmt...) s3c_pm_dbg(fmt) extern void s3c_pm_save_uarts(void); extern void s3c_pm_restore_uarts(void); #else #define S3C_PMDBG(fmt...) pr_debug(fmt) -#define s3c_pm_debug_init() do { } while (0) static inline void s3c_pm_save_uarts(void) { } static inline void s3c_pm_restore_uarts(void) { } diff --git a/arch/arm/plat-samsung/pm-debug.c b/arch/arm/plat-samsung/pm-debug.c index b76b1e9ba4ae..105b61f3304e 100644 --- a/arch/arm/plat-samsung/pm-debug.c +++ b/arch/arm/plat-samsung/pm-debug.c @@ -22,7 +22,6 @@ #include #include #else -static inline void s3c_pm_debug_init_uart(void) {} static inline void s3c_pm_arch_update_uart(void __iomem *regs, struct pm_uart_save *save) {} #endif @@ -43,12 +42,6 @@ void s3c_pm_dbg(const char *fmt, ...) printascii(buff); } -void s3c_pm_debug_init(void) -{ - /* restart uart clocks so we can use them to output */ - s3c_pm_debug_init_uart(); -} - static inline void __iomem *s3c_pm_uart_base(void) { unsigned long paddr; diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index d6bfd66592b0..b40ab7abe6a9 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c @@ -70,8 +70,7 @@ static int s3c_pm_enter(suspend_state_t state) { int ret; /* ensure the debug is initialised (if enabled) */ - - s3c_pm_debug_init(); + s3c_pm_debug_init_uart(); S3C_PMDBG("%s(%d)\n", __func__, state); @@ -144,7 +143,7 @@ static int s3c_pm_enter(suspend_state_t state) s3c_pm_restored_gpios(); } - s3c_pm_debug_init(); + s3c_pm_debug_init_uart(); /* check what irq (if any) restored the system */ -- 2.17.1 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=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 DC656C433DF for ; Thu, 6 Aug 2020 18:24:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2054E22D00 for ; Thu, 6 Aug 2020 18:24:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VNkg0NwY"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="tkd5XZmK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2054E22D00 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oe6va1OhR15SWJcRyCUFrbDeWtvL1yqaDQlmH4+yqhc=; b=VNkg0NwYHHf+D8w3ngrjBp7sRB xcHRYAnThq9WxbAAr41etoUu2vci3+127yF8QI4g2K9ZO8hXibQACb//pG6FCCZlIPIkNhuyWKdmk Xxqw3JrL4OOZdPzkY+tWtiKFXdB5H7tcSZkceMC6kusTgb+hcnstbUvomLaKjLytQjdr0Ik/a0mXJ /5FMckyoxODQzMNsn1+k7mFi5QaV/csdDzIxfa5ZVKKi8mZTf7ywtD1nk72wrsNvX0uyu1Dg0QpS7 YWlKVhxSl7h3yYfcxttVgrVaeSSbhxOt8g6rPUfCb8bV98N0Er/VA2X5BPBZ81AuAdmUn0Z3s1zwO mo7DmX9Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3kXf-0008Ue-J9; Thu, 06 Aug 2020 18:23:03 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3kX0-00084z-AD for linux-arm-kernel@lists.infradead.org; Thu, 06 Aug 2020 18:22:23 +0000 Received: from localhost.localdomain (unknown [194.230.155.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 38FE022D07; Thu, 6 Aug 2020 18:22:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596738142; bh=apFcycz/O6DDKT5iJ4SnSfgBjc6oT0XDJlH7NQkB7HA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tkd5XZmKI9D0TfLj3IIwE7AoFaSbzXVHqlCJGeuNO1nUNoY7SpZQ1eFehbh1pWTnM ryXCTDP13QexBPF9tKlsF4GCLvCK8Y31mKvwJJPqhjcKb5It0oGVlCEkPFcrdTL8dc 9OE8YCKKrmpGSgj8t4hg8AskNCoVCdrq8EhG4PiI= From: Krzysztof Kozlowski To: linux-kernel@vger.kernel.org Subject: [PATCH v2 11/41] ARM: samsung: remove s3c_pm_debug_init() Date: Thu, 6 Aug 2020 20:20:28 +0200 Message-Id: <20200806182059.2431-11-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200806181932.2253-1-krzk@kernel.org> References: <20200806181932.2253-1-krzk@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200806_142222_574850_86A95C2D X-CRM114-Status: GOOD ( 23.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, Arnd Bergmann , Russell King , Krzysztof Kozlowski , Kyungmin Park , Kukjin Kim , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann On s3c24xx and s3c64xx, this is just a wrapper around s3c_pm_debug_init_uart(), but this function does not exist on s5pv210, which always uses an empty stub as CONFIG_SAMSUNG_ATAGS is normally not set. In a configuration that supports both s5pv210 and s3c64xx, we would always call the s3c64xx function, which is probably incorrect when running on s5pv210. Remove the function call completely on s5pv210 and skip the wrapper on s3c as a cleanup. As a side-effect, the s3c64xx behavior is now always the same, regardless of whether it is a DT-only configuration or both DT and ATAGS are supported for booting. Signed-off-by: Arnd Bergmann Signed-off-by: Krzysztof Kozlowski --- arch/arm/mach-s3c24xx/include/mach/pm-core.h | 2 ++ arch/arm/mach-s3c64xx/include/mach/pm-core.h | 2 ++ arch/arm/mach-s5pv210/pm.c | 2 -- arch/arm/plat-samsung/include/plat/pm-common.h | 10 ---------- arch/arm/plat-samsung/pm-debug.c | 7 ------- arch/arm/plat-samsung/pm.c | 5 ++--- 6 files changed, 6 insertions(+), 22 deletions(-) diff --git a/arch/arm/mach-s3c24xx/include/mach/pm-core.h b/arch/arm/mach-s3c24xx/include/mach/pm-core.h index 5e4ce89d0158..cd6406820cb1 100644 --- a/arch/arm/mach-s3c24xx/include/mach/pm-core.h +++ b/arch/arm/mach-s3c24xx/include/mach/pm-core.h @@ -15,6 +15,7 @@ static inline void s3c_pm_debug_init_uart(void) { +#ifdef CONFIG_SAMSUNG_PM_DEBUG unsigned long tmp = __raw_readl(S3C2410_CLKCON); /* re-start uart clocks */ @@ -24,6 +25,7 @@ static inline void s3c_pm_debug_init_uart(void) __raw_writel(tmp, S3C2410_CLKCON); udelay(10); +#endif } static inline void s3c_pm_arch_prepare_irqs(void) diff --git a/arch/arm/mach-s3c64xx/include/mach/pm-core.h b/arch/arm/mach-s3c64xx/include/mach/pm-core.h index bbf79ed28583..1c7d179a86f3 100644 --- a/arch/arm/mach-s3c64xx/include/mach/pm-core.h +++ b/arch/arm/mach-s3c64xx/include/mach/pm-core.h @@ -20,6 +20,7 @@ static inline void s3c_pm_debug_init_uart(void) { +#ifdef CONFIG_SAMSUNG_PM_DEBUG u32 tmp = __raw_readl(S3C_PCLK_GATE); /* As a note, since the S3C64XX UARTs generally have multiple @@ -35,6 +36,7 @@ static inline void s3c_pm_debug_init_uart(void) __raw_writel(tmp, S3C_PCLK_GATE); udelay(10); +#endif } static inline void s3c_pm_arch_prepare_irqs(void) diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c index b336df0c57f3..725e6746f345 100644 --- a/arch/arm/mach-s5pv210/pm.c +++ b/arch/arm/mach-s5pv210/pm.c @@ -99,8 +99,6 @@ static int s5pv210_suspend_enter(suspend_state_t state) u32 eint_wakeup_mask = s5pv210_read_eint_wakeup_mask(); int ret; - s3c_pm_debug_init(); - S3C_PMDBG("%s: suspending the system...\n", __func__); S3C_PMDBG("%s: wakeup masks: %08x,%08x\n", __func__, diff --git a/arch/arm/plat-samsung/include/plat/pm-common.h b/arch/arm/plat-samsung/include/plat/pm-common.h index 1268bae04234..467e7c867c46 100644 --- a/arch/arm/plat-samsung/include/plat/pm-common.h +++ b/arch/arm/plat-samsung/include/plat/pm-common.h @@ -69,22 +69,12 @@ struct pm_uart_save { */ extern void s3c_pm_dbg(const char *msg, ...); -/** - * s3c_pm_debug_init() - suspend/resume low level debug initialization. - * @base: Virtual base of UART to use for suspend/resume debugging. - * - * This function needs to be called before S3C_PMDBG() can be used, to set up - * UART port base address and configuration. - */ -extern void s3c_pm_debug_init(void); - #define S3C_PMDBG(fmt...) s3c_pm_dbg(fmt) extern void s3c_pm_save_uarts(void); extern void s3c_pm_restore_uarts(void); #else #define S3C_PMDBG(fmt...) pr_debug(fmt) -#define s3c_pm_debug_init() do { } while (0) static inline void s3c_pm_save_uarts(void) { } static inline void s3c_pm_restore_uarts(void) { } diff --git a/arch/arm/plat-samsung/pm-debug.c b/arch/arm/plat-samsung/pm-debug.c index b76b1e9ba4ae..105b61f3304e 100644 --- a/arch/arm/plat-samsung/pm-debug.c +++ b/arch/arm/plat-samsung/pm-debug.c @@ -22,7 +22,6 @@ #include #include #else -static inline void s3c_pm_debug_init_uart(void) {} static inline void s3c_pm_arch_update_uart(void __iomem *regs, struct pm_uart_save *save) {} #endif @@ -43,12 +42,6 @@ void s3c_pm_dbg(const char *fmt, ...) printascii(buff); } -void s3c_pm_debug_init(void) -{ - /* restart uart clocks so we can use them to output */ - s3c_pm_debug_init_uart(); -} - static inline void __iomem *s3c_pm_uart_base(void) { unsigned long paddr; diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index d6bfd66592b0..b40ab7abe6a9 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c @@ -70,8 +70,7 @@ static int s3c_pm_enter(suspend_state_t state) { int ret; /* ensure the debug is initialised (if enabled) */ - - s3c_pm_debug_init(); + s3c_pm_debug_init_uart(); S3C_PMDBG("%s(%d)\n", __func__, state); @@ -144,7 +143,7 @@ static int s3c_pm_enter(suspend_state_t state) s3c_pm_restored_gpios(); } - s3c_pm_debug_init(); + s3c_pm_debug_init_uart(); /* check what irq (if any) restored the system */ -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel