aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/pm.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-11-24 20:59:46 -0500
committerNicolas Ferre <nicolas.ferre@atmel.com>2012-02-23 08:57:57 -0500
commitb55149529d265718a989b67468c4f03de0d3af7a (patch)
treecccba7e40bbca7b0ded59152162bb64b343dc337 /arch/arm/mach-at91/pm.c
parent940192e3c651eb6b97b42cb4c28e9e8471675cd2 (diff)
ARM: at91/PMC: make register base soc independent
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Reviewed-by: Ryan Mallon <rmallon@gmail.com>
Diffstat (limited to 'arch/arm/mach-at91/pm.c')
-rw-r--r--arch/arm/mach-at91/pm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 2793591c73c0..6c9d5e69ac28 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -136,7 +136,7 @@ static int at91_pm_verify_clocks(void)
136 unsigned long scsr; 136 unsigned long scsr;
137 int i; 137 int i;
138 138
139 scsr = at91_sys_read(AT91_PMC_SCSR); 139 scsr = at91_pmc_read(AT91_PMC_SCSR);
140 140
141 /* USB must not be using PLLB */ 141 /* USB must not be using PLLB */
142 if (cpu_is_at91rm9200()) { 142 if (cpu_is_at91rm9200()) {
@@ -160,7 +160,7 @@ static int at91_pm_verify_clocks(void)
160 if ((scsr & (AT91_PMC_PCK0 << i)) == 0) 160 if ((scsr & (AT91_PMC_PCK0 << i)) == 0)
161 continue; 161 continue;
162 162
163 css = at91_sys_read(AT91_PMC_PCKR(i)) & AT91_PMC_CSS; 163 css = at91_pmc_read(AT91_PMC_PCKR(i)) & AT91_PMC_CSS;
164 if (css != AT91_PMC_CSS_SLOW) { 164 if (css != AT91_PMC_CSS_SLOW) {
165 pr_err("AT91: PM - Suspend-to-RAM with PCK%d src %d\n", i, css); 165 pr_err("AT91: PM - Suspend-to-RAM with PCK%d src %d\n", i, css);
166 return 0; 166 return 0;
@@ -197,7 +197,6 @@ extern void at91_slow_clock(void __iomem *pmc, void __iomem *ramc0,
197extern u32 at91_slow_clock_sz; 197extern u32 at91_slow_clock_sz;
198#endif 198#endif
199 199
200static void __iomem *at91_pmc_base = (void __iomem*)(AT91_VA_BASE_SYS + AT91_PMC);
201void __iomem *at91_ramc_base[2]; 200void __iomem *at91_ramc_base[2];
202 201
203void __init at91_ioremap_ramc(int id, u32 addr, u32 size) 202void __init at91_ioremap_ramc(int id, u32 addr, u32 size)
@@ -218,7 +217,7 @@ static int at91_pm_enter(suspend_state_t state)
218 217
219 pr_debug("AT91: PM - wake mask %08x, pm state %d\n", 218 pr_debug("AT91: PM - wake mask %08x, pm state %d\n",
220 /* remember all the always-wake irqs */ 219 /* remember all the always-wake irqs */
221 (at91_sys_read(AT91_PMC_PCSR) 220 (at91_pmc_read(AT91_PMC_PCSR)
222 | (1 << AT91_ID_FIQ) 221 | (1 << AT91_ID_FIQ)
223 | (1 << AT91_ID_SYS) 222 | (1 << AT91_ID_SYS)
224 | (at91_extern_irq)) 223 | (at91_extern_irq))