aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ux500/clock.c')
-rw-r--r--arch/arm/mach-ux500/clock.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c
index ccff2dae167f..b2b0a3b9be8f 100644
--- a/arch/arm/mach-ux500/clock.c
+++ b/arch/arm/mach-ux500/clock.c
@@ -136,8 +136,7 @@ EXPORT_SYMBOL(clk_disable);
136 */ 136 */
137static unsigned long clk_mtu_get_rate(struct clk *clk) 137static unsigned long clk_mtu_get_rate(struct clk *clk)
138{ 138{
139 void __iomem *addr = __io_address(UX500_PRCMU_BASE) 139 void __iomem *addr;
140 + PRCM_TCR;
141 u32 tcr; 140 u32 tcr;
142 int mtu = (int) clk->data; 141 int mtu = (int) clk->data;
143 /* 142 /*
@@ -149,13 +148,20 @@ static unsigned long clk_mtu_get_rate(struct clk *clk)
149 unsigned long mturate; 148 unsigned long mturate;
150 unsigned long retclk; 149 unsigned long retclk;
151 150
151 if (cpu_is_u5500())
152 addr = __io_address(U5500_PRCMU_BASE);
153 else if (cpu_is_u8500())
154 addr = __io_address(U8500_PRCMU_BASE);
155 else
156 ux500_unknown_soc();
157
152 /* 158 /*
153 * On a startup, always conifgure the TCR to the doze mode; 159 * On a startup, always conifgure the TCR to the doze mode;
154 * bootloaders do it for us. Do this in the kernel too. 160 * bootloaders do it for us. Do this in the kernel too.
155 */ 161 */
156 writel(PRCM_TCR_DOZE_MODE, addr); 162 writel(PRCM_TCR_DOZE_MODE, addr + PRCM_TCR);
157 163
158 tcr = readl(addr); 164 tcr = readl(addr + PRCM_TCR);
159 165
160 /* Get the rate from the parent as a default */ 166 /* Get the rate from the parent as a default */
161 if (clk->parent_periph) 167 if (clk->parent_periph)