From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Kukjin Kim <kgene.kim@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org,
Sachin Kamat <sachin.kamat@linaro.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Tomasz Figa <t.figa@samsung.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-kernel@vger.kernel.org,
Kyungmin Park <kyungmin.park@samsung.com>,
linaro-kernel@lists.linaro.org,
linux-arm-kernel@lists.infradead.org, b.zolnierkie@samsung.com
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 [thread overview]
Message-ID: <1407245666-20016-2-git-send-email-b.zolnierkie@samsung.com> (raw)
In-Reply-To: <1407245666-20016-1-git-send-email-b.zolnierkie@samsung.com>
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 <b.zolnierkie@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
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)
--
1.8.2.3
next prev parent reply other threads:[~2014-08-05 13:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-05 13:34 [PATCH v5 0/5] ARM: EXYNOS: cpuidle: fix AFTR mode on boards with secure firmware enabled Bartlomiej Zolnierkiewicz
2014-08-05 13:34 ` Bartlomiej Zolnierkiewicz [this message]
2014-08-05 13:34 ` [PATCH v5 2/5] ARM: EXYNOS: add AFTR mode support to firmware do_idle method Bartlomiej Zolnierkiewicz
2014-08-05 13:34 ` [PATCH v5 3/5] ARM: EXYNOS: cpuidle: add secure firmware support to AFTR mode code Bartlomiej Zolnierkiewicz
2014-08-05 13:34 ` [PATCH v5 4/5] ARM: EXYNOS: PM: fix register setup for " Bartlomiej Zolnierkiewicz
2014-08-05 13:34 ` [PATCH v5 5/5] ARM: EXYNOS: cpuidle: allow driver usage on Exynos4x12 SoCs Bartlomiej Zolnierkiewicz
2014-08-05 13:50 ` [PATCH v5 0/5] ARM: EXYNOS: cpuidle: fix AFTR mode on boards with secure firmware enabled Daniel Lezcano
2014-08-07 17:18 ` Bartlomiej Zolnierkiewicz
2014-08-05 14:03 ` Daniel Lezcano
2014-08-05 14:26 ` Krzysztof Kozlowski
2014-08-05 15:07 ` Daniel Lezcano
2014-09-05 12:28 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1407245666-20016-2-git-send-email-b.zolnierkie@samsung.com \
--to=b.zolnierkie@samsung.com \
--cc=daniel.lezcano@linaro.org \
--cc=kgene.kim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=sachin.kamat@linaro.org \
--cc=t.figa@samsung.com \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox