aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/psc.c
diff options
context:
space:
mode:
authorCyril Chemparathy <cyril@ti.com>2010-05-07 17:06:36 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2010-05-13 13:05:27 -0400
commite4c822c7e98cdda78b10a696b030fc20b22dcab4 (patch)
tree95a1ec13b404369fbc5104aed64adf29a8f78709 /arch/arm/mach-davinci/psc.c
parent1bcd38ad2de4c1cd30387c588dfb28d637d4111d (diff)
Davinci: psc - use ioremap()
This patch modifies the psc and clock control code to use ioremap()ed registers. Signed-off-by: Cyril Chemparathy <cyril@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/psc.c')
-rw-r--r--arch/arm/mach-davinci/psc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/psc.c b/arch/arm/mach-davinci/psc.c
index d7cb438c4df..1b15dbd0a77 100644
--- a/arch/arm/mach-davinci/psc.c
+++ b/arch/arm/mach-davinci/psc.c
@@ -38,8 +38,9 @@ int __init davinci_psc_is_clk_active(unsigned int ctlr, unsigned int id)
38 return 0; 38 return 0;
39 } 39 }
40 40
41 psc_base = soc_info->psc_bases[ctlr]; 41 psc_base = ioremap(soc_info->psc_bases[ctlr], SZ_4K);
42 mdstat = __raw_readl(psc_base + MDSTAT + 4 * id); 42 mdstat = __raw_readl(psc_base + MDSTAT + 4 * id);
43 iounmap(psc_base);
43 44
44 /* if clocked, state can be "Enable" or "SyncReset" */ 45 /* if clocked, state can be "Enable" or "SyncReset" */
45 return mdstat & BIT(12); 46 return mdstat & BIT(12);
@@ -59,7 +60,7 @@ void davinci_psc_config(unsigned int domain, unsigned int ctlr,
59 return; 60 return;
60 } 61 }
61 62
62 psc_base = soc_info->psc_bases[ctlr]; 63 psc_base = ioremap(soc_info->psc_bases[ctlr], SZ_4K);
63 64
64 mdctl = __raw_readl(psc_base + MDCTL + 4 * id); 65 mdctl = __raw_readl(psc_base + MDCTL + 4 * id);
65 mdctl &= ~MDSTAT_STATE_MASK; 66 mdctl &= ~MDSTAT_STATE_MASK;
@@ -99,4 +100,6 @@ void davinci_psc_config(unsigned int domain, unsigned int ctlr,
99 do { 100 do {
100 mdstat = __raw_readl(psc_base + MDSTAT + 4 * id); 101 mdstat = __raw_readl(psc_base + MDSTAT + 4 * id);
101 } while (!((mdstat & MDSTAT_STATE_MASK) == next_state)); 102 } while (!((mdstat & MDSTAT_STATE_MASK) == next_state));
103
104 iounmap(psc_base);
102} 105}