From patchwork Thu Feb 6 19:12:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 3598141 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9E770BF418 for ; Thu, 6 Feb 2014 19:50:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BE30120131 for ; Thu, 6 Feb 2014 19:50:28 +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 5FCDB2012F for ; Thu, 6 Feb 2014 19:50:27 +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 1WBUQ7-0006pv-Vo; Thu, 06 Feb 2014 19:15:33 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WBUPP-0000mB-35; Thu, 06 Feb 2014 19:14:47 +0000 Received: from mailout3.w1.samsung.com ([210.118.77.13]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WBUOB-0000cI-Ef for linux-arm-kernel@lists.infradead.org; Thu, 06 Feb 2014 19:13:37 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N0L00IQZ9DVXJA0@mailout3.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 06 Feb 2014 19:13:07 +0000 (GMT) X-AuditID: cbfec7f5-b7fc96d000004885-35-52f3dec2d13d Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 4D.74.18565.2CED3F25; Thu, 06 Feb 2014 19:13:06 +0000 (GMT) Received: from AMDC1227.digital.local ([106.116.147.199]) by eusync4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N0L002UD9DPUJ50@eusync4.samsung.com>; Thu, 06 Feb 2014 19:13:06 +0000 (GMT) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 05/12] ARM: SAMSUNG: pm: Consolidate PM debug functions Date: Thu, 06 Feb 2014 20:12:50 +0100 Message-id: <1391713977-22300-6-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.8.5.2 In-reply-to: <1391713977-22300-1-git-send-email-t.figa@samsung.com> References: <1391713977-22300-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmluLIzCtJLcpLzFFi42I5/e/4Nd1D9z4HGZxaYGbxd9Ixdouzyw6y WfQuuMpmcbbpDbvFpsfXWC1mnN/HZLH2yF12i1PXP7NZrJ/xmsWB0+P3r0mMHrMbLrJ4bF5S 73HlRBOrR9+WVYwenzfJBbBFcdmkpOZklqUW6dslcGU0ruxkLzghWLFjxyL2BsZXfF2MnBwS AiYS0x8dZoawxSQu3FvP1sXIxSEksJRR4vHtSUwQTh+TRN/xH2wgVWwCahKfGx6B2SICqhKf 2xawg9jMApuZJNYccQKxhQW8JB5tfcUEYrMA1Vw9+YMFxOYVcJKY+2YKUJwDaJuCxOrrQiBh TgFnifYJO8DKhYBK7l6+xz6BkXcBI8MqRtHU0uSC4qT0XCO94sTc4tK8dL3k/NxNjJCA+7qD cekxq0OMAhyMSjy8iis+BwmxJpYVV+YeYpTgYFYS4bW9AxTiTUmsrEotyo8vKs1JLT7EyMTB KdXAuI07O2HCYRkB7SseIkzucwxvL2DsscrUd3zsIT6NOTpqI9dRpdOpxzyqmaL/8nkWBK90 vObp9902/e/RExyHslK2Z9zv/eI2d+e9crPTcusmmd05efvW5pfH3etDJx0W5IprrvnzZuGF GzttQ5at1r7ZKv6mpaJO3FU39phrXO2F2ws//n95Q4mlOCPRUIu5qDgRAB+p/pMWAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140206_141331_627945_77FB8EA7 X-CRM114-Status: UNSURE ( 8.25 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -7.4 (-------) Cc: Kukjin Kim , Arnd Bergmann , Tomasz Figa , Doug Anderson , Kyungmin Park , Olof Johansson , linux-arm-kernel@lists.infradead.org, Marek Szyprowski 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 Acked-by: Kyungmin Park --- 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 53b3d67..7c1d4385 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c @@ -85,9 +85,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); @@ -98,18 +99,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); @@ -122,11 +119,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)