diff options
Diffstat (limited to 'arch/arm/mach-imx/clock-imx35.c')
-rw-r--r-- | arch/arm/mach-imx/clock-imx35.c | 166 |
1 files changed, 75 insertions, 91 deletions
diff --git a/arch/arm/mach-imx/clock-imx35.c b/arch/arm/mach-imx/clock-imx35.c index ac8238caecb9..1e279af656ad 100644 --- a/arch/arm/mach-imx/clock-imx35.c +++ b/arch/arm/mach-imx/clock-imx35.c | |||
@@ -27,23 +27,7 @@ | |||
27 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
28 | #include <mach/common.h> | 28 | #include <mach/common.h> |
29 | 29 | ||
30 | #define CCM_BASE MX35_IO_ADDRESS(MX35_CCM_BASE_ADDR) | 30 | #include "crmregs-imx3.h" |
31 | |||
32 | #define CCM_CCMR 0x00 | ||
33 | #define CCM_PDR0 0x04 | ||
34 | #define CCM_PDR1 0x08 | ||
35 | #define CCM_PDR2 0x0C | ||
36 | #define CCM_PDR3 0x10 | ||
37 | #define CCM_PDR4 0x14 | ||
38 | #define CCM_RCSR 0x18 | ||
39 | #define CCM_MPCTL 0x1C | ||
40 | #define CCM_PPCTL 0x20 | ||
41 | #define CCM_ACMR 0x24 | ||
42 | #define CCM_COSR 0x28 | ||
43 | #define CCM_CGR0 0x2C | ||
44 | #define CCM_CGR1 0x30 | ||
45 | #define CCM_CGR2 0x34 | ||
46 | #define CCM_CGR3 0x38 | ||
47 | 31 | ||
48 | #ifdef HAVE_SET_RATE_SUPPORT | 32 | #ifdef HAVE_SET_RATE_SUPPORT |
49 | static void calc_dividers(u32 div, u32 *pre, u32 *post, u32 maxpost) | 33 | static void calc_dividers(u32 div, u32 *pre, u32 *post, u32 maxpost) |
@@ -111,14 +95,14 @@ static void calc_dividers_3_3(u32 div, u32 *pre, u32 *post) | |||
111 | 95 | ||
112 | static unsigned long get_rate_mpll(void) | 96 | static unsigned long get_rate_mpll(void) |
113 | { | 97 | { |
114 | ulong mpctl = __raw_readl(CCM_BASE + CCM_MPCTL); | 98 | ulong mpctl = __raw_readl(MX35_CCM_MPCTL); |
115 | 99 | ||
116 | return mxc_decode_pll(mpctl, 24000000); | 100 | return mxc_decode_pll(mpctl, 24000000); |
117 | } | 101 | } |
118 | 102 | ||
119 | static unsigned long get_rate_ppll(void) | 103 | static unsigned long get_rate_ppll(void) |
120 | { | 104 | { |
121 | ulong ppctl = __raw_readl(CCM_BASE + CCM_PPCTL); | 105 | ulong ppctl = __raw_readl(MX35_CCM_PPCTL); |
122 | 106 | ||
123 | return mxc_decode_pll(ppctl, 24000000); | 107 | return mxc_decode_pll(ppctl, 24000000); |
124 | } | 108 | } |
@@ -148,7 +132,7 @@ static struct arm_ahb_div clk_consumer[] = { | |||
148 | 132 | ||
149 | static unsigned long get_rate_arm(void) | 133 | static unsigned long get_rate_arm(void) |
150 | { | 134 | { |
151 | unsigned long pdr0 = __raw_readl(CCM_BASE + CCM_PDR0); | 135 | unsigned long pdr0 = __raw_readl(MXC_CCM_PDR0); |
152 | struct arm_ahb_div *aad; | 136 | struct arm_ahb_div *aad; |
153 | unsigned long fref = get_rate_mpll(); | 137 | unsigned long fref = get_rate_mpll(); |
154 | 138 | ||
@@ -161,7 +145,7 @@ static unsigned long get_rate_arm(void) | |||
161 | 145 | ||
162 | static unsigned long get_rate_ahb(struct clk *clk) | 146 | static unsigned long get_rate_ahb(struct clk *clk) |
163 | { | 147 | { |
164 | unsigned long pdr0 = __raw_readl(CCM_BASE + CCM_PDR0); | 148 | unsigned long pdr0 = __raw_readl(MXC_CCM_PDR0); |
165 | struct arm_ahb_div *aad; | 149 | struct arm_ahb_div *aad; |
166 | unsigned long fref = get_rate_arm(); | 150 | unsigned long fref = get_rate_arm(); |
167 | 151 | ||
@@ -177,8 +161,8 @@ static unsigned long get_rate_ipg(struct clk *clk) | |||
177 | 161 | ||
178 | static unsigned long get_rate_uart(struct clk *clk) | 162 | static unsigned long get_rate_uart(struct clk *clk) |
179 | { | 163 | { |
180 | unsigned long pdr3 = __raw_readl(CCM_BASE + CCM_PDR3); | 164 | unsigned long pdr3 = __raw_readl(MX35_CCM_PDR3); |
181 | unsigned long pdr4 = __raw_readl(CCM_BASE + CCM_PDR4); | 165 | unsigned long pdr4 = __raw_readl(MX35_CCM_PDR4); |
182 | unsigned long div = ((pdr4 >> 10) & 0x3f) + 1; | 166 | unsigned long div = ((pdr4 >> 10) & 0x3f) + 1; |
183 | 167 | ||
184 | if (pdr3 & (1 << 14)) | 168 | if (pdr3 & (1 << 14)) |
@@ -189,7 +173,7 @@ static unsigned long get_rate_uart(struct clk *clk) | |||
189 | 173 | ||
190 | static unsigned long get_rate_sdhc(struct clk *clk) | 174 | static unsigned long get_rate_sdhc(struct clk *clk) |
191 | { | 175 | { |
192 | unsigned long pdr3 = __raw_readl(CCM_BASE + CCM_PDR3); | 176 | unsigned long pdr3 = __raw_readl(MX35_CCM_PDR3); |
193 | unsigned long div, rate; | 177 | unsigned long div, rate; |
194 | 178 | ||
195 | if (pdr3 & (1 << 6)) | 179 | if (pdr3 & (1 << 6)) |
@@ -215,7 +199,7 @@ static unsigned long get_rate_sdhc(struct clk *clk) | |||
215 | 199 | ||
216 | static unsigned long get_rate_mshc(struct clk *clk) | 200 | static unsigned long get_rate_mshc(struct clk *clk) |
217 | { | 201 | { |
218 | unsigned long pdr1 = __raw_readl(CCM_BASE + CCM_PDR1); | 202 | unsigned long pdr1 = __raw_readl(MXC_CCM_PDR1); |
219 | unsigned long div1, div2, rate; | 203 | unsigned long div1, div2, rate; |
220 | 204 | ||
221 | if (pdr1 & (1 << 7)) | 205 | if (pdr1 & (1 << 7)) |
@@ -231,7 +215,7 @@ static unsigned long get_rate_mshc(struct clk *clk) | |||
231 | 215 | ||
232 | static unsigned long get_rate_ssi(struct clk *clk) | 216 | static unsigned long get_rate_ssi(struct clk *clk) |
233 | { | 217 | { |
234 | unsigned long pdr2 = __raw_readl(CCM_BASE + CCM_PDR2); | 218 | unsigned long pdr2 = __raw_readl(MX35_CCM_PDR2); |
235 | unsigned long div1, div2, rate; | 219 | unsigned long div1, div2, rate; |
236 | 220 | ||
237 | if (pdr2 & (1 << 6)) | 221 | if (pdr2 & (1 << 6)) |
@@ -256,7 +240,7 @@ static unsigned long get_rate_ssi(struct clk *clk) | |||
256 | 240 | ||
257 | static unsigned long get_rate_csi(struct clk *clk) | 241 | static unsigned long get_rate_csi(struct clk *clk) |
258 | { | 242 | { |
259 | unsigned long pdr2 = __raw_readl(CCM_BASE + CCM_PDR2); | 243 | unsigned long pdr2 = __raw_readl(MX35_CCM_PDR2); |
260 | unsigned long rate; | 244 | unsigned long rate; |
261 | 245 | ||
262 | if (pdr2 & (1 << 7)) | 246 | if (pdr2 & (1 << 7)) |
@@ -269,7 +253,7 @@ static unsigned long get_rate_csi(struct clk *clk) | |||
269 | 253 | ||
270 | static unsigned long get_rate_otg(struct clk *clk) | 254 | static unsigned long get_rate_otg(struct clk *clk) |
271 | { | 255 | { |
272 | unsigned long pdr4 = __raw_readl(CCM_BASE + CCM_PDR4); | 256 | unsigned long pdr4 = __raw_readl(MX35_CCM_PDR4); |
273 | unsigned long rate; | 257 | unsigned long rate; |
274 | 258 | ||
275 | if (pdr4 & (1 << 9)) | 259 | if (pdr4 & (1 << 9)) |
@@ -282,8 +266,8 @@ static unsigned long get_rate_otg(struct clk *clk) | |||
282 | 266 | ||
283 | static unsigned long get_rate_ipg_per(struct clk *clk) | 267 | static unsigned long get_rate_ipg_per(struct clk *clk) |
284 | { | 268 | { |
285 | unsigned long pdr0 = __raw_readl(CCM_BASE + CCM_PDR0); | 269 | unsigned long pdr0 = __raw_readl(MXC_CCM_PDR0); |
286 | unsigned long pdr4 = __raw_readl(CCM_BASE + CCM_PDR4); | 270 | unsigned long pdr4 = __raw_readl(MX35_CCM_PDR4); |
287 | unsigned long div; | 271 | unsigned long div; |
288 | 272 | ||
289 | if (pdr0 & (1 << 26)) { | 273 | if (pdr0 & (1 << 26)) { |
@@ -297,7 +281,7 @@ static unsigned long get_rate_ipg_per(struct clk *clk) | |||
297 | 281 | ||
298 | static unsigned long get_rate_hsp(struct clk *clk) | 282 | static unsigned long get_rate_hsp(struct clk *clk) |
299 | { | 283 | { |
300 | unsigned long hsp_podf = (__raw_readl(CCM_BASE + CCM_PDR0) >> 20) & 0x03; | 284 | unsigned long hsp_podf = (__raw_readl(MXC_CCM_PDR0) >> 20) & 0x03; |
301 | unsigned long fref = get_rate_mpll(); | 285 | unsigned long fref = get_rate_mpll(); |
302 | 286 | ||
303 | if (fref > 400 * 1000 * 1000) { | 287 | if (fref > 400 * 1000 * 1000) { |
@@ -345,7 +329,7 @@ static void clk_cgr_disable(struct clk *clk) | |||
345 | #define DEFINE_CLOCK(name, i, er, es, gr, sr) \ | 329 | #define DEFINE_CLOCK(name, i, er, es, gr, sr) \ |
346 | static struct clk name = { \ | 330 | static struct clk name = { \ |
347 | .id = i, \ | 331 | .id = i, \ |
348 | .enable_reg = CCM_BASE + er, \ | 332 | .enable_reg = er, \ |
349 | .enable_shift = es, \ | 333 | .enable_shift = es, \ |
350 | .get_rate = gr, \ | 334 | .get_rate = gr, \ |
351 | .set_rate = sr, \ | 335 | .set_rate = sr, \ |
@@ -353,59 +337,59 @@ static void clk_cgr_disable(struct clk *clk) | |||
353 | .disable = clk_cgr_disable, \ | 337 | .disable = clk_cgr_disable, \ |
354 | } | 338 | } |
355 | 339 | ||
356 | DEFINE_CLOCK(asrc_clk, 0, CCM_CGR0, 0, NULL, NULL); | 340 | DEFINE_CLOCK(asrc_clk, 0, MX35_CCM_CGR0, 0, NULL, NULL); |
357 | DEFINE_CLOCK(pata_clk, 0, CCM_CGR0, 2, get_rate_ipg, NULL); | 341 | DEFINE_CLOCK(pata_clk, 0, MX35_CCM_CGR0, 2, get_rate_ipg, NULL); |
358 | /* DEFINE_CLOCK(audmux_clk, 0, CCM_CGR0, 4, NULL, NULL); */ | 342 | /* DEFINE_CLOCK(audmux_clk, 0, MX35_CCM_CGR0, 4, NULL, NULL); */ |
359 | DEFINE_CLOCK(can1_clk, 0, CCM_CGR0, 6, get_rate_ipg, NULL); | 343 | DEFINE_CLOCK(can1_clk, 0, MX35_CCM_CGR0, 6, get_rate_ipg, NULL); |
360 | DEFINE_CLOCK(can2_clk, 1, CCM_CGR0, 8, get_rate_ipg, NULL); | 344 | DEFINE_CLOCK(can2_clk, 1, MX35_CCM_CGR0, 8, get_rate_ipg, NULL); |
361 | DEFINE_CLOCK(cspi1_clk, 0, CCM_CGR0, 10, get_rate_ipg, NULL); | 345 | DEFINE_CLOCK(cspi1_clk, 0, MX35_CCM_CGR0, 10, get_rate_ipg, NULL); |
362 | DEFINE_CLOCK(cspi2_clk, 1, CCM_CGR0, 12, get_rate_ipg, NULL); | 346 | DEFINE_CLOCK(cspi2_clk, 1, MX35_CCM_CGR0, 12, get_rate_ipg, NULL); |
363 | DEFINE_CLOCK(ect_clk, 0, CCM_CGR0, 14, get_rate_ipg, NULL); | 347 | DEFINE_CLOCK(ect_clk, 0, MX35_CCM_CGR0, 14, get_rate_ipg, NULL); |
364 | DEFINE_CLOCK(edio_clk, 0, CCM_CGR0, 16, NULL, NULL); | 348 | DEFINE_CLOCK(edio_clk, 0, MX35_CCM_CGR0, 16, NULL, NULL); |
365 | DEFINE_CLOCK(emi_clk, 0, CCM_CGR0, 18, get_rate_ipg, NULL); | 349 | DEFINE_CLOCK(emi_clk, 0, MX35_CCM_CGR0, 18, get_rate_ipg, NULL); |
366 | DEFINE_CLOCK(epit1_clk, 0, CCM_CGR0, 20, get_rate_ipg, NULL); | 350 | DEFINE_CLOCK(epit1_clk, 0, MX35_CCM_CGR0, 20, get_rate_ipg, NULL); |
367 | DEFINE_CLOCK(epit2_clk, 1, CCM_CGR0, 22, get_rate_ipg, NULL); | 351 | DEFINE_CLOCK(epit2_clk, 1, MX35_CCM_CGR0, 22, get_rate_ipg, NULL); |
368 | DEFINE_CLOCK(esai_clk, 0, CCM_CGR0, 24, NULL, NULL); | 352 | DEFINE_CLOCK(esai_clk, 0, MX35_CCM_CGR0, 24, NULL, NULL); |
369 | DEFINE_CLOCK(esdhc1_clk, 0, CCM_CGR0, 26, get_rate_sdhc, NULL); | 353 | DEFINE_CLOCK(esdhc1_clk, 0, MX35_CCM_CGR0, 26, get_rate_sdhc, NULL); |
370 | DEFINE_CLOCK(esdhc2_clk, 1, CCM_CGR0, 28, get_rate_sdhc, NULL); | 354 | DEFINE_CLOCK(esdhc2_clk, 1, MX35_CCM_CGR0, 28, get_rate_sdhc, NULL); |
371 | DEFINE_CLOCK(esdhc3_clk, 2, CCM_CGR0, 30, get_rate_sdhc, NULL); | 355 | DEFINE_CLOCK(esdhc3_clk, 2, MX35_CCM_CGR0, 30, get_rate_sdhc, NULL); |
372 | 356 | ||
373 | DEFINE_CLOCK(fec_clk, 0, CCM_CGR1, 0, get_rate_ipg, NULL); | 357 | DEFINE_CLOCK(fec_clk, 0, MX35_CCM_CGR1, 0, get_rate_ipg, NULL); |
374 | DEFINE_CLOCK(gpio1_clk, 0, CCM_CGR1, 2, NULL, NULL); | 358 | DEFINE_CLOCK(gpio1_clk, 0, MX35_CCM_CGR1, 2, NULL, NULL); |
375 | DEFINE_CLOCK(gpio2_clk, 1, CCM_CGR1, 4, NULL, NULL); | 359 | DEFINE_CLOCK(gpio2_clk, 1, MX35_CCM_CGR1, 4, NULL, NULL); |
376 | DEFINE_CLOCK(gpio3_clk, 2, CCM_CGR1, 6, NULL, NULL); | 360 | DEFINE_CLOCK(gpio3_clk, 2, MX35_CCM_CGR1, 6, NULL, NULL); |
377 | DEFINE_CLOCK(gpt_clk, 0, CCM_CGR1, 8, get_rate_ipg, NULL); | 361 | DEFINE_CLOCK(gpt_clk, 0, MX35_CCM_CGR1, 8, get_rate_ipg, NULL); |
378 | DEFINE_CLOCK(i2c1_clk, 0, CCM_CGR1, 10, get_rate_ipg_per, NULL); | 362 | DEFINE_CLOCK(i2c1_clk, 0, MX35_CCM_CGR1, 10, get_rate_ipg_per, NULL); |
379 | DEFINE_CLOCK(i2c2_clk, 1, CCM_CGR1, 12, get_rate_ipg_per, NULL); | 363 | DEFINE_CLOCK(i2c2_clk, 1, MX35_CCM_CGR1, 12, get_rate_ipg_per, NULL); |
380 | DEFINE_CLOCK(i2c3_clk, 2, CCM_CGR1, 14, get_rate_ipg_per, NULL); | 364 | DEFINE_CLOCK(i2c3_clk, 2, MX35_CCM_CGR1, 14, get_rate_ipg_per, NULL); |
381 | DEFINE_CLOCK(iomuxc_clk, 0, CCM_CGR1, 16, NULL, NULL); | 365 | DEFINE_CLOCK(iomuxc_clk, 0, MX35_CCM_CGR1, 16, NULL, NULL); |
382 | DEFINE_CLOCK(ipu_clk, 0, CCM_CGR1, 18, get_rate_hsp, NULL); | 366 | DEFINE_CLOCK(ipu_clk, 0, MX35_CCM_CGR1, 18, get_rate_hsp, NULL); |
383 | DEFINE_CLOCK(kpp_clk, 0, CCM_CGR1, 20, get_rate_ipg, NULL); | 367 | DEFINE_CLOCK(kpp_clk, 0, MX35_CCM_CGR1, 20, get_rate_ipg, NULL); |
384 | DEFINE_CLOCK(mlb_clk, 0, CCM_CGR1, 22, get_rate_ahb, NULL); | 368 | DEFINE_CLOCK(mlb_clk, 0, MX35_CCM_CGR1, 22, get_rate_ahb, NULL); |
385 | DEFINE_CLOCK(mshc_clk, 0, CCM_CGR1, 24, get_rate_mshc, NULL); | 369 | DEFINE_CLOCK(mshc_clk, 0, MX35_CCM_CGR1, 24, get_rate_mshc, NULL); |
386 | DEFINE_CLOCK(owire_clk, 0, CCM_CGR1, 26, get_rate_ipg_per, NULL); | 370 | DEFINE_CLOCK(owire_clk, 0, MX35_CCM_CGR1, 26, get_rate_ipg_per, NULL); |
387 | DEFINE_CLOCK(pwm_clk, 0, CCM_CGR1, 28, get_rate_ipg_per, NULL); | 371 | DEFINE_CLOCK(pwm_clk, 0, MX35_CCM_CGR1, 28, get_rate_ipg_per, NULL); |
388 | DEFINE_CLOCK(rngc_clk, 0, CCM_CGR1, 30, get_rate_ipg, NULL); | 372 | DEFINE_CLOCK(rngc_clk, 0, MX35_CCM_CGR1, 30, get_rate_ipg, NULL); |
389 | 373 | ||
390 | DEFINE_CLOCK(rtc_clk, 0, CCM_CGR2, 0, get_rate_ipg, NULL); | 374 | DEFINE_CLOCK(rtc_clk, 0, MX35_CCM_CGR2, 0, get_rate_ipg, NULL); |
391 | DEFINE_CLOCK(rtic_clk, 0, CCM_CGR2, 2, get_rate_ahb, NULL); | 375 | DEFINE_CLOCK(rtic_clk, 0, MX35_CCM_CGR2, 2, get_rate_ahb, NULL); |
392 | DEFINE_CLOCK(scc_clk, 0, CCM_CGR2, 4, get_rate_ipg, NULL); | 376 | DEFINE_CLOCK(scc_clk, 0, MX35_CCM_CGR2, 4, get_rate_ipg, NULL); |
393 | DEFINE_CLOCK(sdma_clk, 0, CCM_CGR2, 6, NULL, NULL); | 377 | DEFINE_CLOCK(sdma_clk, 0, MX35_CCM_CGR2, 6, NULL, NULL); |
394 | DEFINE_CLOCK(spba_clk, 0, CCM_CGR2, 8, get_rate_ipg, NULL); | 378 | DEFINE_CLOCK(spba_clk, 0, MX35_CCM_CGR2, 8, get_rate_ipg, NULL); |
395 | DEFINE_CLOCK(spdif_clk, 0, CCM_CGR2, 10, NULL, NULL); | 379 | DEFINE_CLOCK(spdif_clk, 0, MX35_CCM_CGR2, 10, NULL, NULL); |
396 | DEFINE_CLOCK(ssi1_clk, 0, CCM_CGR2, 12, get_rate_ssi, NULL); | 380 | DEFINE_CLOCK(ssi1_clk, 0, MX35_CCM_CGR2, 12, get_rate_ssi, NULL); |
397 | DEFINE_CLOCK(ssi2_clk, 1, CCM_CGR2, 14, get_rate_ssi, NULL); | 381 | DEFINE_CLOCK(ssi2_clk, 1, MX35_CCM_CGR2, 14, get_rate_ssi, NULL); |
398 | DEFINE_CLOCK(uart1_clk, 0, CCM_CGR2, 16, get_rate_uart, NULL); | 382 | DEFINE_CLOCK(uart1_clk, 0, MX35_CCM_CGR2, 16, get_rate_uart, NULL); |
399 | DEFINE_CLOCK(uart2_clk, 1, CCM_CGR2, 18, get_rate_uart, NULL); | 383 | DEFINE_CLOCK(uart2_clk, 1, MX35_CCM_CGR2, 18, get_rate_uart, NULL); |
400 | DEFINE_CLOCK(uart3_clk, 2, CCM_CGR2, 20, get_rate_uart, NULL); | 384 | DEFINE_CLOCK(uart3_clk, 2, MX35_CCM_CGR2, 20, get_rate_uart, NULL); |
401 | DEFINE_CLOCK(usbotg_clk, 0, CCM_CGR2, 22, get_rate_otg, NULL); | 385 | DEFINE_CLOCK(usbotg_clk, 0, MX35_CCM_CGR2, 22, get_rate_otg, NULL); |
402 | DEFINE_CLOCK(wdog_clk, 0, CCM_CGR2, 24, NULL, NULL); | 386 | DEFINE_CLOCK(wdog_clk, 0, MX35_CCM_CGR2, 24, NULL, NULL); |
403 | DEFINE_CLOCK(max_clk, 0, CCM_CGR2, 26, NULL, NULL); | 387 | DEFINE_CLOCK(max_clk, 0, MX35_CCM_CGR2, 26, NULL, NULL); |
404 | DEFINE_CLOCK(audmux_clk, 0, CCM_CGR2, 30, NULL, NULL); | 388 | DEFINE_CLOCK(audmux_clk, 0, MX35_CCM_CGR2, 30, NULL, NULL); |
405 | 389 | ||
406 | DEFINE_CLOCK(csi_clk, 0, CCM_CGR3, 0, get_rate_csi, NULL); | 390 | DEFINE_CLOCK(csi_clk, 0, MX35_CCM_CGR3, 0, get_rate_csi, NULL); |
407 | DEFINE_CLOCK(iim_clk, 0, CCM_CGR3, 2, NULL, NULL); | 391 | DEFINE_CLOCK(iim_clk, 0, MX35_CCM_CGR3, 2, NULL, NULL); |
408 | DEFINE_CLOCK(gpu2d_clk, 0, CCM_CGR3, 4, NULL, NULL); | 392 | DEFINE_CLOCK(gpu2d_clk, 0, MX35_CCM_CGR3, 4, NULL, NULL); |
409 | 393 | ||
410 | DEFINE_CLOCK(usbahb_clk, 0, 0, 0, get_rate_ahb, NULL); | 394 | DEFINE_CLOCK(usbahb_clk, 0, 0, 0, get_rate_ahb, NULL); |
411 | 395 | ||
@@ -422,7 +406,7 @@ static unsigned long get_rate_nfc(struct clk *clk) | |||
422 | { | 406 | { |
423 | unsigned long div1; | 407 | unsigned long div1; |
424 | 408 | ||
425 | div1 = (__raw_readl(CCM_BASE + CCM_PDR4) >> 28) + 1; | 409 | div1 = (__raw_readl(MX35_CCM_PDR4) >> 28) + 1; |
426 | 410 | ||
427 | return get_rate_ahb(NULL) / div1; | 411 | return get_rate_ahb(NULL) / div1; |
428 | } | 412 | } |
@@ -518,11 +502,11 @@ int __init mx35_clocks_init() | |||
518 | /* Turn off all clocks except the ones we need to survive, namely: | 502 | /* Turn off all clocks except the ones we need to survive, namely: |
519 | * EMI, GPIO1/2/3, GPT, IOMUX, MAX and eventually uart | 503 | * EMI, GPIO1/2/3, GPT, IOMUX, MAX and eventually uart |
520 | */ | 504 | */ |
521 | __raw_writel((3 << 18), CCM_BASE + CCM_CGR0); | 505 | __raw_writel((3 << 18), MX35_CCM_CGR0); |
522 | __raw_writel((3 << 2) | (3 << 4) | (3 << 6) | (3 << 8) | (3 << 16), | 506 | __raw_writel((3 << 2) | (3 << 4) | (3 << 6) | (3 << 8) | (3 << 16), |
523 | CCM_BASE + CCM_CGR1); | 507 | MX35_CCM_CGR1); |
524 | __raw_writel(cgr2, CCM_BASE + CCM_CGR2); | 508 | __raw_writel(cgr2, MX35_CCM_CGR2); |
525 | __raw_writel(0, CCM_BASE + CCM_CGR3); | 509 | __raw_writel(0, MX35_CCM_CGR3); |
526 | 510 | ||
527 | clk_enable(&iim_clk); | 511 | clk_enable(&iim_clk); |
528 | imx_print_silicon_rev("i.MX35", mx35_revision()); | 512 | imx_print_silicon_rev("i.MX35", mx35_revision()); |
@@ -533,7 +517,7 @@ int __init mx35_clocks_init() | |||
533 | * extra clocks turned on, otherwise the MX35 boot ROM code will | 517 | * extra clocks turned on, otherwise the MX35 boot ROM code will |
534 | * hang after a watchdog reset. | 518 | * hang after a watchdog reset. |
535 | */ | 519 | */ |
536 | if (!(__raw_readl(CCM_BASE + CCM_RCSR) & (3 << 10))) { | 520 | if (!(__raw_readl(MX35_CCM_RCSR) & (3 << 10))) { |
537 | /* Additionally turn on UART1, SCC, and IIM clocks */ | 521 | /* Additionally turn on UART1, SCC, and IIM clocks */ |
538 | clk_enable(&iim_clk); | 522 | clk_enable(&iim_clk); |
539 | clk_enable(&uart1_clk); | 523 | clk_enable(&uart1_clk); |