diff options
author | Pankaj Dubey <pankaj.dubey@samsung.com> | 2014-11-07 03:26:47 +0300 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-11-21 16:49:44 +0300 |
commit | 6b7bfd8292ab27180662bcba175e7a3822486c2d (patch) | |
tree | c6ff0ebc0d083121498b058ff973ae222683f790 /arch/arm/mach-exynos/pmu.c | |
parent | 14fc8b93d47323561edf5d482d4a4b3ee1b90286 (diff) | |
download | linux-6b7bfd8292ab27180662bcba175e7a3822486c2d.tar.xz |
ARM: EXYNOS: Move PMU specific definitions from common.h
This patch moves PMU specific definitions into a new file
as exynos-pmu.h.
This will help in reducing dependency of common.h in pmu.c.
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos/pmu.c')
-rw-r--r-- | arch/arm/mach-exynos/pmu.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c index 24cd4c471c47..88d3f793e267 100644 --- a/arch/arm/mach-exynos/pmu.c +++ b/arch/arm/mach-exynos/pmu.c @@ -13,9 +13,16 @@ #include <linux/of.h> #include <linux/platform_device.h> -#include "common.h" +#include "exynos-pmu.h" #include "regs-pmu.h" +#define PMU_TABLE_END (-1U) + +struct exynos_pmu_conf { + unsigned int offset; + unsigned int val[NUM_SYS_POWERDOWN]; +}; + struct exynos_pmu_data { const struct exynos_pmu_conf *pmu_config; const struct exynos_pmu_conf *pmu_config_extra; @@ -29,8 +36,19 @@ struct exynos_pmu_context { const struct exynos_pmu_data *pmu_data; }; +static void __iomem *pmu_base_addr; static struct exynos_pmu_context *pmu_context; +static inline void pmu_raw_writel(u32 val, u32 offset) +{ + writel_relaxed(val, pmu_base_addr + offset); +} + +static inline u32 pmu_raw_readl(u32 offset) +{ + return readl_relaxed(pmu_base_addr + offset); +} + static const struct exynos_pmu_conf exynos4210_pmu_config[] = { /* { .offset = offset, .val = { AFTR, LPA, SLEEP } */ { S5P_ARM_CORE0_LOWPWR, { 0x0, 0x0, 0x2 } }, |