From patchwork Tue Aug 5 13:34:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 4679181 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 5C163C0338 for ; Tue, 5 Aug 2014 13:37:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E06A42018E for ; Tue, 5 Aug 2014 13:37:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (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 001B320117 for ; Tue, 5 Aug 2014 13:37:17 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XEetr-0003dg-NG; Tue, 05 Aug 2014 13:35:35 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XEetZ-0002C7-7X for linux-arm-kernel@lists.infradead.org; Tue, 05 Aug 2014 13:35:22 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N9U00IH65PUXE30@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 05 Aug 2014 22:34:42 +0900 (KST) X-AuditID: cbfee61b-f79f86d00000144c-3e-53e0dd7246b5 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id B8.02.05196.27DD0E35; Tue, 05 Aug 2014 22:34:42 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N9U00GY75PGK020@mmp1.samsung.com>; Tue, 05 Aug 2014 22:34:42 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Kukjin Kim Subject: [PATCH v5 1/5] ARM: EXYNOS: PM: replace EXYNOS_BOOT_VECTOR_* macros by static inlines Date: Tue, 05 Aug 2014 15:34:22 +0200 Message-id: <1407245666-20016-2-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1407245666-20016-1-git-send-email-b.zolnierkie@samsung.com> References: <1407245666-20016-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrKLMWRmVeSWpSXmKPExsVy+t9jAd2iuw+CDW7M5LLYOGM9q8W8z7IW vQuuslmcbXrDbvH+0DNmi02Pr7FaXN41h83ic+8RRosZ5/cxWZw5fYnV4uSfXkaL9TNes1hs /OrhwOtx59oeNo/NS+o9bv97zOyx5Wo7i0ffllWMHp83yQWwRXHZpKTmZJalFunbJXBl3Dwy lalglVBF75QJrA2MZ/i7GDk5JARMJHr/XGCBsMUkLtxbz9bFyMUhJLCIUWLJhumMEE4Xk0T7 nlawKjYBK4mJ7asYQWwRATWJnsVbwYqYBfYySyzt3sQOkhAWSJB427qOGcRmEVCVmHLmFVgz r4CHxKIvEDUSAooS3c8msIHYnAKeEo3XnoHVCwHVbL6ym2kCI+8CRoZVjKKpBckFxUnpuUZ6 xYm5xaV56XrJ+bmbGMGB+Ux6B+OqBotDjAIcjEo8vAJq94OFWBPLiitzDzFKcDArifCy334Q LMSbklhZlVqUH19UmpNafIhRmoNFSZz3YKt1oJBAemJJanZqakFqEUyWiYNTqoGx76xL+xWm cqEzm2c1SHVtr/xhnak7bZ+PR9a24mWh6/0jVI41rw359C9jh+XRX0fe/Vc5aN21LbXV0qM0 7N9SrnSTS5mfuhV2dU17w6ncebxERfumldLMg+EpoZfO1M9k2D3jmnfuxIvVFj1y8plfbZZX pRldNT6tsFxtb9ACb9tvhsd/T3VUYinOSDTUYi4qTgQAESIY1kgCAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140805_063517_435325_0AE1203F X-CRM114-Status: GOOD ( 10.12 ) X-Spam-Score: -5.7 (-----) Cc: linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, Sachin Kamat , Viresh Kumar , Tomasz Figa , Daniel Lezcano , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Kyungmin Park , linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org, b.zolnierkie@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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=-2.6 required=5.0 tests=BAYES_00,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 Replace EXYNOS_BOOT_VECTOR_ADDR and EXYNOS_BOOT_VECTOR_FLAG macros by exynos_boot_vector_addr() and exynos_boot_vector_flag() static inlines. This patch shouldn't cause any functionality changes. Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Kyungmin Park Acked-by: Daniel Lezcano --- arch/arm/mach-exynos/pm.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 454c1cc..78e50ed 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -101,16 +101,23 @@ static int exynos_irq_set_wake(struct irq_data *data, unsigned int state) return -ENOENT; } -#define EXYNOS_BOOT_VECTOR_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \ - pmu_base_addr + S5P_INFORM7 : \ - (samsung_rev() == EXYNOS4210_REV_1_0 ? \ - (sysram_base_addr + 0x24) : \ - pmu_base_addr + S5P_INFORM0)) -#define EXYNOS_BOOT_VECTOR_FLAG (samsung_rev() == EXYNOS4210_REV_1_1 ? \ - pmu_base_addr + S5P_INFORM6 : \ - (samsung_rev() == EXYNOS4210_REV_1_0 ? \ - (sysram_base_addr + 0x20) : \ - pmu_base_addr + S5P_INFORM1)) +static inline void __iomem *exynos_boot_vector_addr(void) +{ + if (samsung_rev() == EXYNOS4210_REV_1_1) + return pmu_base_addr + S5P_INFORM7; + else if (samsung_rev() == EXYNOS4210_REV_1_0) + return sysram_base_addr + 0x24; + return pmu_base_addr + S5P_INFORM0; +} + +static inline void __iomem *exynos_boot_vector_flag(void) +{ + if (samsung_rev() == EXYNOS4210_REV_1_1) + return pmu_base_addr + S5P_INFORM6; + else if (samsung_rev() == EXYNOS4210_REV_1_0) + return sysram_base_addr + 0x20; + return pmu_base_addr + S5P_INFORM1; +} #define S5P_CHECK_AFTR 0xFCBA0D10 #define S5P_CHECK_SLEEP 0x00000BAD @@ -195,8 +202,9 @@ static void exynos_set_wakeupmask(long mask) static void exynos_cpu_set_boot_vector(long flags) { - __raw_writel(virt_to_phys(exynos_cpu_resume), EXYNOS_BOOT_VECTOR_ADDR); - __raw_writel(flags, EXYNOS_BOOT_VECTOR_FLAG); + __raw_writel(virt_to_phys(exynos_cpu_resume), + exynos_boot_vector_addr()); + __raw_writel(flags, exynos_boot_vector_flag()); } static int exynos_aftr_finisher(unsigned long flags)