From patchwork Tue Dec 24 14:14:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 3403841 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8F11F9F375 for ; Tue, 24 Dec 2013 15:19:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8BD9120591 for ; Tue, 24 Dec 2013 15:19:39 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2F7D22058E for ; Tue, 24 Dec 2013 15:19:38 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VvSoS-000425-45; Tue, 24 Dec 2013 14:18:24 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VvSoP-0005WT-EE; Tue, 24 Dec 2013 14:18:21 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VvSlj-00058e-D4 for linux-arm-kernel@lists.infradead.org; Tue, 24 Dec 2013 14:15:40 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MYB00I4FE97BR60@mailout1.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 24 Dec 2013 14:15:07 +0000 (GMT) X-AuditID: cbfec7f4-b7f796d000005a13-c3-52b996eb3dd6 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 05.19.23059.BE699B25; Tue, 24 Dec 2013 14:15:07 +0000 (GMT) Received: from amdc1227.digital.local ([106.116.147.199]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0MYB00MNYE90WR00@eusync2.samsung.com>; Tue, 24 Dec 2013 14:15:07 +0000 (GMT) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH RFC 04/11] ARM: SAMSUNG: pm: Consolidate PM debug functions Date: Tue, 24 Dec 2013 15:14:27 +0100 Message-id: <1387894474-14428-4-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.8.4.3 In-reply-to: <1387894474-14428-1-git-send-email-t.figa@samsung.com> References: <1387894474-14428-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrAJMWRmVeSWpSXmKPExsVy+t/xK7qvp+0MMjizXtni76Rj7Ba9C66y WWx6fI3VYsb5fUwWp65/ZrNYP+M1iwObx+9fkxg9Ni+p97hyoonVo2/LKkaPz5vkAlijuGxS UnMyy1KL9O0SuDJu/b/OVDBRsGL92uvsDYw7+boYOTkkBEwkPjz9ywphi0lcuLeeDcQWEljK KPFqckUXIxeQ3cck8fRlCxNIgk1ATeJzwyOwIhEBVYnPbQvYQYqYBTYxSnzefRhskrCAt8TR Px/AiliAij7cms8MYvMKOEksfDmJDWKbgkTnmv+MIDangLPE1U+X2SE2O0l8vvSaeQIj7wJG hlWMoqmlyQXFSem5hnrFibnFpXnpesn5uZsYIaH0ZQfj4mNWhxgFOBiVeHgLSncECbEmlhVX 5h5ilOBgVhLhvaK4M0iINyWxsiq1KD++qDQntfgQIxMHp1QDY0WN3+6jptnqjOnbFJ6+/hj+ UKvyQE7upXCRD3p+Jh8iDJgnq2pzrb9bIW4y1bC2IOyMW+GXC/0x2dfMFl69ZnJqj8U925p1 FybNW7GoL0mwfdH+ZWofukJn//6vqBQ102LTBf6oN1anN+1xTrP//+mWWUjRpqMHajUXKuRZ pHX22jfIvPp0VImlOCPRUIu5qDgRAMCC26QDAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131224_091535_626149_08A34E2D X-CRM114-Status: UNSURE ( 8.20 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.5 (-------) Cc: Olof Johansson , Tomasz Figa , Kukjin Kim , Arnd Bergmann , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch removes one-line functions that was used just to pass constant arguments to lower level functions. After previous patches the need for those constants has been eliminated, so the main functions can be called directly. Signed-off-by: Tomasz Figa --- arch/arm/plat-samsung/pm.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index bafd4f1..6f19a8e 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c @@ -83,9 +83,10 @@ static inline void __iomem *s3c_pm_uart_base(void) return (void __iomem *)vaddr; } -static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save) +static void s3c_pm_save_uarts(void) { void __iomem *regs = s3c_pm_uart_base(); + struct pm_uart_save *save = &uart_save; save->ulcon = __raw_readl(regs + S3C2410_ULCON); save->ucon = __raw_readl(regs + S3C2410_UCON); @@ -96,18 +97,14 @@ static void s3c_pm_save_uart(unsigned int uart, struct pm_uart_save *save) if (!soc_is_s3c2410()) save->udivslot = __raw_readl(regs + S3C2443_DIVSLOT); - S3C_PMDBG("UART[%d]: ULCON=%04x, UCON=%04x, UFCON=%04x, UBRDIV=%04x\n", - uart, save->ulcon, save->ucon, save->ufcon, save->ubrdiv); -} - -static void s3c_pm_save_uarts(void) -{ - s3c_pm_save_uart(CONFIG_DEBUG_S3C_UART, &uart_save); + S3C_PMDBG("UART[%p]: ULCON=%04x, UCON=%04x, UFCON=%04x, UBRDIV=%04x\n", + regs, save->ulcon, save->ucon, save->ufcon, save->ubrdiv); } -static void s3c_pm_restore_uart(unsigned int uart, struct pm_uart_save *save) +static void s3c_pm_restore_uarts(void) { void __iomem *regs = s3c_pm_uart_base(); + struct pm_uart_save *save = &uart_save; s3c_pm_arch_update_uart(regs, save); @@ -120,11 +117,6 @@ static void s3c_pm_restore_uart(unsigned int uart, struct pm_uart_save *save) if (!soc_is_s3c2410()) __raw_writel(save->udivslot, regs + S3C2443_DIVSLOT); } - -static void s3c_pm_restore_uarts(void) -{ - s3c_pm_restore_uart(CONFIG_DEBUG_S3C_UART, &uart_save); -} #else #define s3c_pm_debug_init() do { } while(0)