aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos/common.h
diff options
context:
space:
mode:
authorPankaj Dubey <pankaj.dubey@samsung.com>2014-07-18 14:43:22 -0400
committerKukjin Kim <kgene.kim@samsung.com>2014-07-22 19:20:30 -0400
commit2e94ac42898f84d76e3c21dd91bcd1c51c920dff (patch)
tree099ba810bbcaea5849e6c6d9430549631b66c724 /arch/arm/mach-exynos/common.h
parent20fe6f98fae6968b9d6067d49d9ecae9d9593b37 (diff)
ARM: EXYNOS: Refactored code for using PMU address via DT
Under "arm/mach-exynos" many files are using PMU register offsets. Since we have added support for accessing PMU base address via DT, now we can remove PMU mapping from exynosX_iodesc. Let's convert all these access using iomapped address. This will help us in removing static mapping of PMU base address as well as help in reducing dependency over machine header files. Thus helping for migration of PMU implementation from machine to driver folder which can be reused for ARM64 based SoC. Also as we have removed static mappings from "regs-pmu.h" it does not need map.h anymore. But "platsmp.c" needed this and till now it got included indirectly. So lets move header inclusion of "mach/map.h" from "regs-pmu.h" to "platsmp.c". Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos/common.h')
-rw-r--r--arch/arm/mach-exynos/common.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index f8daa9cc5617..47b904b3b973 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -134,7 +134,7 @@ extern void exynos_cpu_die(unsigned int cpu);
134 134
135/* PMU(Power Management Unit) support */ 135/* PMU(Power Management Unit) support */
136 136
137#define PMU_TABLE_END NULL 137#define PMU_TABLE_END (-1U)
138 138
139enum sys_powerdown { 139enum sys_powerdown {
140 SYS_AFTR, 140 SYS_AFTR,
@@ -144,7 +144,7 @@ enum sys_powerdown {
144}; 144};
145 145
146struct exynos_pmu_conf { 146struct exynos_pmu_conf {
147 void __iomem *reg; 147 unsigned int offset;
148 unsigned int val[NUM_SYS_POWERDOWN]; 148 unsigned int val[NUM_SYS_POWERDOWN];
149}; 149};
150 150
@@ -160,4 +160,14 @@ extern void exynos_enter_aftr(void);
160extern void s5p_init_cpu(void __iomem *cpuid_addr); 160extern void s5p_init_cpu(void __iomem *cpuid_addr);
161extern unsigned int samsung_rev(void); 161extern unsigned int samsung_rev(void);
162 162
163static inline void pmu_raw_writel(u32 val, u32 offset)
164{
165 __raw_writel(val, pmu_base_addr + offset);
166}
167
168static inline u32 pmu_raw_readl(u32 offset)
169{
170 return __raw_readl(pmu_base_addr + offset);
171}
172
163#endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */ 173#endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */