diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2013-03-19 06:21:56 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-04-08 07:59:19 -0400 |
commit | 9b819060d349e2247c471d8f055c91a597560da0 (patch) | |
tree | e95bac4ebfd5115cf26e8697124e93de653d2b2e | |
parent | 9bed3e05e94fbdfc986fba4be7fa5e83db909874 (diff) |
clk: ux500: pass clock base adresses in init call
The ux500 clock driver was including <mach/db8500-regs.h>
which will not work when building for multiplatform support
since <mach/*> is going away.
Pass the base adresses in the init call instead.
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Mike Turquette <mturquette@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | arch/arm/mach-ux500/cpu.c | 8 | ||||
-rw-r--r-- | drivers/clk/ux500/u8500_clk.c | 142 | ||||
-rw-r--r-- | include/linux/platform_data/clk-ux500.h | 3 |
3 files changed, 79 insertions, 74 deletions
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 2c5c48baa3eb..ee69439d5a8e 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
@@ -70,11 +70,15 @@ void __init ux500_init_irq(void) | |||
70 | if (cpu_is_u8500_family()) { | 70 | if (cpu_is_u8500_family()) { |
71 | prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1); | 71 | prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1); |
72 | ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1); | 72 | ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1); |
73 | u8500_clk_init(); | 73 | u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE, |
74 | U8500_CLKRST3_BASE, U8500_CLKRST5_BASE, | ||
75 | U8500_CLKRST6_BASE); | ||
74 | } else if (cpu_is_u9540()) { | 76 | } else if (cpu_is_u9540()) { |
75 | prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1); | 77 | prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1); |
76 | ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1); | 78 | ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1); |
77 | u8500_clk_init(); | 79 | u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE, |
80 | U8500_CLKRST3_BASE, U8500_CLKRST5_BASE, | ||
81 | U8500_CLKRST6_BASE); | ||
78 | } else if (cpu_is_u8540()) { | 82 | } else if (cpu_is_u8540()) { |
79 | prcmu_early_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1); | 83 | prcmu_early_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1); |
80 | ux500_pm_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1); | 84 | ux500_pm_init(U8500_PRCMU_BASE, SZ_8K + SZ_4K - 1); |
diff --git a/drivers/clk/ux500/u8500_clk.c b/drivers/clk/ux500/u8500_clk.c index 6b889a0e90b3..0c9b83d98f11 100644 --- a/drivers/clk/ux500/u8500_clk.c +++ b/drivers/clk/ux500/u8500_clk.c | |||
@@ -12,10 +12,10 @@ | |||
12 | #include <linux/clk-provider.h> | 12 | #include <linux/clk-provider.h> |
13 | #include <linux/mfd/dbx500-prcmu.h> | 13 | #include <linux/mfd/dbx500-prcmu.h> |
14 | #include <linux/platform_data/clk-ux500.h> | 14 | #include <linux/platform_data/clk-ux500.h> |
15 | #include <mach/db8500-regs.h> | ||
16 | #include "clk.h" | 15 | #include "clk.h" |
17 | 16 | ||
18 | void u8500_clk_init(void) | 17 | void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base, |
18 | u32 clkrst5_base, u32 clkrst6_base) | ||
19 | { | 19 | { |
20 | struct prcmu_fw_version *fw_version; | 20 | struct prcmu_fw_version *fw_version; |
21 | const char *sgaclk_parent = NULL; | 21 | const char *sgaclk_parent = NULL; |
@@ -215,147 +215,147 @@ void u8500_clk_init(void) | |||
215 | */ | 215 | */ |
216 | 216 | ||
217 | /* PRCC P-clocks */ | 217 | /* PRCC P-clocks */ |
218 | clk = clk_reg_prcc_pclk("p1_pclk0", "per1clk", U8500_CLKRST1_BASE, | 218 | clk = clk_reg_prcc_pclk("p1_pclk0", "per1clk", clkrst1_base, |
219 | BIT(0), 0); | 219 | BIT(0), 0); |
220 | clk_register_clkdev(clk, "apb_pclk", "uart0"); | 220 | clk_register_clkdev(clk, "apb_pclk", "uart0"); |
221 | 221 | ||
222 | clk = clk_reg_prcc_pclk("p1_pclk1", "per1clk", U8500_CLKRST1_BASE, | 222 | clk = clk_reg_prcc_pclk("p1_pclk1", "per1clk", clkrst1_base, |
223 | BIT(1), 0); | 223 | BIT(1), 0); |
224 | clk_register_clkdev(clk, "apb_pclk", "uart1"); | 224 | clk_register_clkdev(clk, "apb_pclk", "uart1"); |
225 | 225 | ||
226 | clk = clk_reg_prcc_pclk("p1_pclk2", "per1clk", U8500_CLKRST1_BASE, | 226 | clk = clk_reg_prcc_pclk("p1_pclk2", "per1clk", clkrst1_base, |
227 | BIT(2), 0); | 227 | BIT(2), 0); |
228 | clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.1"); | 228 | clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.1"); |
229 | 229 | ||
230 | clk = clk_reg_prcc_pclk("p1_pclk3", "per1clk", U8500_CLKRST1_BASE, | 230 | clk = clk_reg_prcc_pclk("p1_pclk3", "per1clk", clkrst1_base, |
231 | BIT(3), 0); | 231 | BIT(3), 0); |
232 | clk_register_clkdev(clk, "apb_pclk", "msp0"); | 232 | clk_register_clkdev(clk, "apb_pclk", "msp0"); |
233 | clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.0"); | 233 | clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.0"); |
234 | 234 | ||
235 | clk = clk_reg_prcc_pclk("p1_pclk4", "per1clk", U8500_CLKRST1_BASE, | 235 | clk = clk_reg_prcc_pclk("p1_pclk4", "per1clk", clkrst1_base, |
236 | BIT(4), 0); | 236 | BIT(4), 0); |
237 | clk_register_clkdev(clk, "apb_pclk", "msp1"); | 237 | clk_register_clkdev(clk, "apb_pclk", "msp1"); |
238 | clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.1"); | 238 | clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.1"); |
239 | 239 | ||
240 | clk = clk_reg_prcc_pclk("p1_pclk5", "per1clk", U8500_CLKRST1_BASE, | 240 | clk = clk_reg_prcc_pclk("p1_pclk5", "per1clk", clkrst1_base, |
241 | BIT(5), 0); | 241 | BIT(5), 0); |
242 | clk_register_clkdev(clk, "apb_pclk", "sdi0"); | 242 | clk_register_clkdev(clk, "apb_pclk", "sdi0"); |
243 | 243 | ||
244 | clk = clk_reg_prcc_pclk("p1_pclk6", "per1clk", U8500_CLKRST1_BASE, | 244 | clk = clk_reg_prcc_pclk("p1_pclk6", "per1clk", clkrst1_base, |
245 | BIT(6), 0); | 245 | BIT(6), 0); |
246 | clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.2"); | 246 | clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.2"); |
247 | 247 | ||
248 | clk = clk_reg_prcc_pclk("p1_pclk7", "per1clk", U8500_CLKRST1_BASE, | 248 | clk = clk_reg_prcc_pclk("p1_pclk7", "per1clk", clkrst1_base, |
249 | BIT(7), 0); | 249 | BIT(7), 0); |
250 | clk_register_clkdev(clk, NULL, "spi3"); | 250 | clk_register_clkdev(clk, NULL, "spi3"); |
251 | 251 | ||
252 | clk = clk_reg_prcc_pclk("p1_pclk8", "per1clk", U8500_CLKRST1_BASE, | 252 | clk = clk_reg_prcc_pclk("p1_pclk8", "per1clk", clkrst1_base, |
253 | BIT(8), 0); | 253 | BIT(8), 0); |
254 | clk_register_clkdev(clk, "apb_pclk", "slimbus0"); | 254 | clk_register_clkdev(clk, "apb_pclk", "slimbus0"); |
255 | 255 | ||
256 | clk = clk_reg_prcc_pclk("p1_pclk9", "per1clk", U8500_CLKRST1_BASE, | 256 | clk = clk_reg_prcc_pclk("p1_pclk9", "per1clk", clkrst1_base, |
257 | BIT(9), 0); | 257 | BIT(9), 0); |
258 | clk_register_clkdev(clk, NULL, "gpio.0"); | 258 | clk_register_clkdev(clk, NULL, "gpio.0"); |
259 | clk_register_clkdev(clk, NULL, "gpio.1"); | 259 | clk_register_clkdev(clk, NULL, "gpio.1"); |
260 | clk_register_clkdev(clk, NULL, "gpioblock0"); | 260 | clk_register_clkdev(clk, NULL, "gpioblock0"); |
261 | 261 | ||
262 | clk = clk_reg_prcc_pclk("p1_pclk10", "per1clk", U8500_CLKRST1_BASE, | 262 | clk = clk_reg_prcc_pclk("p1_pclk10", "per1clk", clkrst1_base, |
263 | BIT(10), 0); | 263 | BIT(10), 0); |
264 | clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.4"); | 264 | clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.4"); |
265 | 265 | ||
266 | clk = clk_reg_prcc_pclk("p1_pclk11", "per1clk", U8500_CLKRST1_BASE, | 266 | clk = clk_reg_prcc_pclk("p1_pclk11", "per1clk", clkrst1_base, |
267 | BIT(11), 0); | 267 | BIT(11), 0); |
268 | clk_register_clkdev(clk, "apb_pclk", "msp3"); | 268 | clk_register_clkdev(clk, "apb_pclk", "msp3"); |
269 | clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.3"); | 269 | clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.3"); |
270 | 270 | ||
271 | clk = clk_reg_prcc_pclk("p2_pclk0", "per2clk", U8500_CLKRST2_BASE, | 271 | clk = clk_reg_prcc_pclk("p2_pclk0", "per2clk", clkrst2_base, |
272 | BIT(0), 0); | 272 | BIT(0), 0); |
273 | clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.3"); | 273 | clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.3"); |
274 | 274 | ||
275 | clk = clk_reg_prcc_pclk("p2_pclk1", "per2clk", U8500_CLKRST2_BASE, | 275 | clk = clk_reg_prcc_pclk("p2_pclk1", "per2clk", clkrst2_base, |
276 | BIT(1), 0); | 276 | BIT(1), 0); |
277 | clk_register_clkdev(clk, NULL, "spi2"); | 277 | clk_register_clkdev(clk, NULL, "spi2"); |
278 | 278 | ||
279 | clk = clk_reg_prcc_pclk("p2_pclk2", "per2clk", U8500_CLKRST2_BASE, | 279 | clk = clk_reg_prcc_pclk("p2_pclk2", "per2clk", clkrst2_base, |
280 | BIT(2), 0); | 280 | BIT(2), 0); |
281 | clk_register_clkdev(clk, NULL, "spi1"); | 281 | clk_register_clkdev(clk, NULL, "spi1"); |
282 | 282 | ||
283 | clk = clk_reg_prcc_pclk("p2_pclk3", "per2clk", U8500_CLKRST2_BASE, | 283 | clk = clk_reg_prcc_pclk("p2_pclk3", "per2clk", clkrst2_base, |
284 | BIT(3), 0); | 284 | BIT(3), 0); |
285 | clk_register_clkdev(clk, NULL, "pwl"); | 285 | clk_register_clkdev(clk, NULL, "pwl"); |
286 | 286 | ||
287 | clk = clk_reg_prcc_pclk("p2_pclk4", "per2clk", U8500_CLKRST2_BASE, | 287 | clk = clk_reg_prcc_pclk("p2_pclk4", "per2clk", clkrst2_base, |
288 | BIT(4), 0); | 288 | BIT(4), 0); |
289 | clk_register_clkdev(clk, "apb_pclk", "sdi4"); | 289 | clk_register_clkdev(clk, "apb_pclk", "sdi4"); |
290 | 290 | ||
291 | clk = clk_reg_prcc_pclk("p2_pclk5", "per2clk", U8500_CLKRST2_BASE, | 291 | clk = clk_reg_prcc_pclk("p2_pclk5", "per2clk", clkrst2_base, |
292 | BIT(5), 0); | 292 | BIT(5), 0); |
293 | clk_register_clkdev(clk, "apb_pclk", "msp2"); | 293 | clk_register_clkdev(clk, "apb_pclk", "msp2"); |
294 | clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.2"); | 294 | clk_register_clkdev(clk, "apb_pclk", "ux500-msp-i2s.2"); |
295 | 295 | ||
296 | clk = clk_reg_prcc_pclk("p2_pclk6", "per2clk", U8500_CLKRST2_BASE, | 296 | clk = clk_reg_prcc_pclk("p2_pclk6", "per2clk", clkrst2_base, |
297 | BIT(6), 0); | 297 | BIT(6), 0); |
298 | clk_register_clkdev(clk, "apb_pclk", "sdi1"); | 298 | clk_register_clkdev(clk, "apb_pclk", "sdi1"); |
299 | 299 | ||
300 | clk = clk_reg_prcc_pclk("p2_pclk7", "per2clk", U8500_CLKRST2_BASE, | 300 | clk = clk_reg_prcc_pclk("p2_pclk7", "per2clk", clkrst2_base, |
301 | BIT(7), 0); | 301 | BIT(7), 0); |
302 | clk_register_clkdev(clk, "apb_pclk", "sdi3"); | 302 | clk_register_clkdev(clk, "apb_pclk", "sdi3"); |
303 | 303 | ||
304 | clk = clk_reg_prcc_pclk("p2_pclk8", "per2clk", U8500_CLKRST2_BASE, | 304 | clk = clk_reg_prcc_pclk("p2_pclk8", "per2clk", clkrst2_base, |
305 | BIT(8), 0); | 305 | BIT(8), 0); |
306 | clk_register_clkdev(clk, NULL, "spi0"); | 306 | clk_register_clkdev(clk, NULL, "spi0"); |
307 | 307 | ||
308 | clk = clk_reg_prcc_pclk("p2_pclk9", "per2clk", U8500_CLKRST2_BASE, | 308 | clk = clk_reg_prcc_pclk("p2_pclk9", "per2clk", clkrst2_base, |
309 | BIT(9), 0); | 309 | BIT(9), 0); |
310 | clk_register_clkdev(clk, "hsir_hclk", "ste_hsi.0"); | 310 | clk_register_clkdev(clk, "hsir_hclk", "ste_hsi.0"); |
311 | 311 | ||
312 | clk = clk_reg_prcc_pclk("p2_pclk10", "per2clk", U8500_CLKRST2_BASE, | 312 | clk = clk_reg_prcc_pclk("p2_pclk10", "per2clk", clkrst2_base, |
313 | BIT(10), 0); | 313 | BIT(10), 0); |
314 | clk_register_clkdev(clk, "hsit_hclk", "ste_hsi.0"); | 314 | clk_register_clkdev(clk, "hsit_hclk", "ste_hsi.0"); |
315 | 315 | ||
316 | clk = clk_reg_prcc_pclk("p2_pclk11", "per2clk", U8500_CLKRST2_BASE, | 316 | clk = clk_reg_prcc_pclk("p2_pclk11", "per2clk", clkrst2_base, |
317 | BIT(11), 0); | 317 | BIT(11), 0); |
318 | clk_register_clkdev(clk, NULL, "gpio.6"); | 318 | clk_register_clkdev(clk, NULL, "gpio.6"); |
319 | clk_register_clkdev(clk, NULL, "gpio.7"); | 319 | clk_register_clkdev(clk, NULL, "gpio.7"); |
320 | clk_register_clkdev(clk, NULL, "gpioblock1"); | 320 | clk_register_clkdev(clk, NULL, "gpioblock1"); |
321 | 321 | ||
322 | clk = clk_reg_prcc_pclk("p2_pclk12", "per2clk", U8500_CLKRST2_BASE, | 322 | clk = clk_reg_prcc_pclk("p2_pclk12", "per2clk", clkrst2_base, |
323 | BIT(12), 0); | 323 | BIT(12), 0); |
324 | 324 | ||
325 | clk = clk_reg_prcc_pclk("p3_pclk0", "per3clk", U8500_CLKRST3_BASE, | 325 | clk = clk_reg_prcc_pclk("p3_pclk0", "per3clk", clkrst3_base, |
326 | BIT(0), 0); | 326 | BIT(0), 0); |
327 | clk_register_clkdev(clk, NULL, "fsmc"); | 327 | clk_register_clkdev(clk, NULL, "fsmc"); |
328 | 328 | ||
329 | clk = clk_reg_prcc_pclk("p3_pclk1", "per3clk", U8500_CLKRST3_BASE, | 329 | clk = clk_reg_prcc_pclk("p3_pclk1", "per3clk", clkrst3_base, |
330 | BIT(1), 0); | 330 | BIT(1), 0); |
331 | clk_register_clkdev(clk, "apb_pclk", "ssp0"); | 331 | clk_register_clkdev(clk, "apb_pclk", "ssp0"); |
332 | 332 | ||
333 | clk = clk_reg_prcc_pclk("p3_pclk2", "per3clk", U8500_CLKRST3_BASE, | 333 | clk = clk_reg_prcc_pclk("p3_pclk2", "per3clk", clkrst3_base, |
334 | BIT(2), 0); | 334 | BIT(2), 0); |
335 | clk_register_clkdev(clk, "apb_pclk", "ssp1"); | 335 | clk_register_clkdev(clk, "apb_pclk", "ssp1"); |
336 | 336 | ||
337 | clk = clk_reg_prcc_pclk("p3_pclk3", "per3clk", U8500_CLKRST3_BASE, | 337 | clk = clk_reg_prcc_pclk("p3_pclk3", "per3clk", clkrst3_base, |
338 | BIT(3), 0); | 338 | BIT(3), 0); |
339 | clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.0"); | 339 | clk_register_clkdev(clk, "apb_pclk", "nmk-i2c.0"); |
340 | 340 | ||
341 | clk = clk_reg_prcc_pclk("p3_pclk4", "per3clk", U8500_CLKRST3_BASE, | 341 | clk = clk_reg_prcc_pclk("p3_pclk4", "per3clk", clkrst3_base, |
342 | BIT(4), 0); | 342 | BIT(4), 0); |
343 | clk_register_clkdev(clk, "apb_pclk", "sdi2"); | 343 | clk_register_clkdev(clk, "apb_pclk", "sdi2"); |
344 | 344 | ||
345 | clk = clk_reg_prcc_pclk("p3_pclk5", "per3clk", U8500_CLKRST3_BASE, | 345 | clk = clk_reg_prcc_pclk("p3_pclk5", "per3clk", clkrst3_base, |
346 | BIT(5), 0); | 346 | BIT(5), 0); |
347 | clk_register_clkdev(clk, "apb_pclk", "ske"); | 347 | clk_register_clkdev(clk, "apb_pclk", "ske"); |
348 | clk_register_clkdev(clk, "apb_pclk", "nmk-ske-keypad"); | 348 | clk_register_clkdev(clk, "apb_pclk", "nmk-ske-keypad"); |
349 | 349 | ||
350 | clk = clk_reg_prcc_pclk("p3_pclk6", "per3clk", U8500_CLKRST3_BASE, | 350 | clk = clk_reg_prcc_pclk("p3_pclk6", "per3clk", clkrst3_base, |
351 | BIT(6), 0); | 351 | BIT(6), 0); |
352 | clk_register_clkdev(clk, "apb_pclk", "uart2"); | 352 | clk_register_clkdev(clk, "apb_pclk", "uart2"); |
353 | 353 | ||
354 | clk = clk_reg_prcc_pclk("p3_pclk7", "per3clk", U8500_CLKRST3_BASE, | 354 | clk = clk_reg_prcc_pclk("p3_pclk7", "per3clk", clkrst3_base, |
355 | BIT(7), 0); | 355 | BIT(7), 0); |
356 | clk_register_clkdev(clk, "apb_pclk", "sdi5"); | 356 | clk_register_clkdev(clk, "apb_pclk", "sdi5"); |
357 | 357 | ||
358 | clk = clk_reg_prcc_pclk("p3_pclk8", "per3clk", U8500_CLKRST3_BASE, | 358 | clk = clk_reg_prcc_pclk("p3_pclk8", "per3clk", clkrst3_base, |
359 | BIT(8), 0); | 359 | BIT(8), 0); |
360 | clk_register_clkdev(clk, NULL, "gpio.2"); | 360 | clk_register_clkdev(clk, NULL, "gpio.2"); |
361 | clk_register_clkdev(clk, NULL, "gpio.3"); | 361 | clk_register_clkdev(clk, NULL, "gpio.3"); |
@@ -363,45 +363,45 @@ void u8500_clk_init(void) | |||
363 | clk_register_clkdev(clk, NULL, "gpio.5"); | 363 | clk_register_clkdev(clk, NULL, "gpio.5"); |
364 | clk_register_clkdev(clk, NULL, "gpioblock2"); | 364 | clk_register_clkdev(clk, NULL, "gpioblock2"); |
365 | 365 | ||
366 | clk = clk_reg_prcc_pclk("p5_pclk0", "per5clk", U8500_CLKRST5_BASE, | 366 | clk = clk_reg_prcc_pclk("p5_pclk0", "per5clk", clkrst5_base, |
367 | BIT(0), 0); | 367 | BIT(0), 0); |
368 | clk_register_clkdev(clk, "usb", "musb-ux500.0"); | 368 | clk_register_clkdev(clk, "usb", "musb-ux500.0"); |
369 | 369 | ||
370 | clk = clk_reg_prcc_pclk("p5_pclk1", "per5clk", U8500_CLKRST5_BASE, | 370 | clk = clk_reg_prcc_pclk("p5_pclk1", "per5clk", clkrst5_base, |
371 | BIT(1), 0); | 371 | BIT(1), 0); |
372 | clk_register_clkdev(clk, NULL, "gpio.8"); | 372 | clk_register_clkdev(clk, NULL, "gpio.8"); |
373 | clk_register_clkdev(clk, NULL, "gpioblock3"); | 373 | clk_register_clkdev(clk, NULL, "gpioblock3"); |
374 | 374 | ||
375 | clk = clk_reg_prcc_pclk("p6_pclk0", "per6clk", U8500_CLKRST6_BASE, | 375 | clk = clk_reg_prcc_pclk("p6_pclk0", "per6clk", clkrst6_base, |
376 | BIT(0), 0); | 376 | BIT(0), 0); |
377 | clk_register_clkdev(clk, "apb_pclk", "rng"); | 377 | clk_register_clkdev(clk, "apb_pclk", "rng"); |
378 | 378 | ||
379 | clk = clk_reg_prcc_pclk("p6_pclk1", "per6clk", U8500_CLKRST6_BASE, | 379 | clk = clk_reg_prcc_pclk("p6_pclk1", "per6clk", clkrst6_base, |
380 | BIT(1), 0); | 380 | BIT(1), 0); |
381 | clk_register_clkdev(clk, NULL, "cryp0"); | 381 | clk_register_clkdev(clk, NULL, "cryp0"); |
382 | clk_register_clkdev(clk, NULL, "cryp1"); | 382 | clk_register_clkdev(clk, NULL, "cryp1"); |
383 | 383 | ||
384 | clk = clk_reg_prcc_pclk("p6_pclk2", "per6clk", U8500_CLKRST6_BASE, | 384 | clk = clk_reg_prcc_pclk("p6_pclk2", "per6clk", clkrst6_base, |
385 | BIT(2), 0); | 385 | BIT(2), 0); |
386 | clk_register_clkdev(clk, NULL, "hash0"); | 386 | clk_register_clkdev(clk, NULL, "hash0"); |
387 | 387 | ||
388 | clk = clk_reg_prcc_pclk("p6_pclk3", "per6clk", U8500_CLKRST6_BASE, | 388 | clk = clk_reg_prcc_pclk("p6_pclk3", "per6clk", clkrst6_base, |
389 | BIT(3), 0); | 389 | BIT(3), 0); |
390 | clk_register_clkdev(clk, NULL, "pka"); | 390 | clk_register_clkdev(clk, NULL, "pka"); |
391 | 391 | ||
392 | clk = clk_reg_prcc_pclk("p6_pclk4", "per6clk", U8500_CLKRST6_BASE, | 392 | clk = clk_reg_prcc_pclk("p6_pclk4", "per6clk", clkrst6_base, |
393 | BIT(4), 0); | 393 | BIT(4), 0); |
394 | clk_register_clkdev(clk, NULL, "hash1"); | 394 | clk_register_clkdev(clk, NULL, "hash1"); |
395 | 395 | ||
396 | clk = clk_reg_prcc_pclk("p6_pclk5", "per6clk", U8500_CLKRST6_BASE, | 396 | clk = clk_reg_prcc_pclk("p6_pclk5", "per6clk", clkrst6_base, |
397 | BIT(5), 0); | 397 | BIT(5), 0); |
398 | clk_register_clkdev(clk, NULL, "cfgreg"); | 398 | clk_register_clkdev(clk, NULL, "cfgreg"); |
399 | 399 | ||
400 | clk = clk_reg_prcc_pclk("p6_pclk6", "per6clk", U8500_CLKRST6_BASE, | 400 | clk = clk_reg_prcc_pclk("p6_pclk6", "per6clk", clkrst6_base, |
401 | BIT(6), 0); | 401 | BIT(6), 0); |
402 | clk_register_clkdev(clk, "apb_pclk", "mtu0"); | 402 | clk_register_clkdev(clk, "apb_pclk", "mtu0"); |
403 | 403 | ||
404 | clk = clk_reg_prcc_pclk("p6_pclk7", "per6clk", U8500_CLKRST6_BASE, | 404 | clk = clk_reg_prcc_pclk("p6_pclk7", "per6clk", clkrst6_base, |
405 | BIT(7), 0); | 405 | BIT(7), 0); |
406 | clk_register_clkdev(clk, "apb_pclk", "mtu1"); | 406 | clk_register_clkdev(clk, "apb_pclk", "mtu1"); |
407 | 407 | ||
@@ -415,110 +415,110 @@ void u8500_clk_init(void) | |||
415 | 415 | ||
416 | /* Periph1 */ | 416 | /* Periph1 */ |
417 | clk = clk_reg_prcc_kclk("p1_uart0_kclk", "uartclk", | 417 | clk = clk_reg_prcc_kclk("p1_uart0_kclk", "uartclk", |
418 | U8500_CLKRST1_BASE, BIT(0), CLK_SET_RATE_GATE); | 418 | clkrst1_base, BIT(0), CLK_SET_RATE_GATE); |
419 | clk_register_clkdev(clk, NULL, "uart0"); | 419 | clk_register_clkdev(clk, NULL, "uart0"); |
420 | 420 | ||
421 | clk = clk_reg_prcc_kclk("p1_uart1_kclk", "uartclk", | 421 | clk = clk_reg_prcc_kclk("p1_uart1_kclk", "uartclk", |
422 | U8500_CLKRST1_BASE, BIT(1), CLK_SET_RATE_GATE); | 422 | clkrst1_base, BIT(1), CLK_SET_RATE_GATE); |
423 | clk_register_clkdev(clk, NULL, "uart1"); | 423 | clk_register_clkdev(clk, NULL, "uart1"); |
424 | 424 | ||
425 | clk = clk_reg_prcc_kclk("p1_i2c1_kclk", "i2cclk", | 425 | clk = clk_reg_prcc_kclk("p1_i2c1_kclk", "i2cclk", |
426 | U8500_CLKRST1_BASE, BIT(2), CLK_SET_RATE_GATE); | 426 | clkrst1_base, BIT(2), CLK_SET_RATE_GATE); |
427 | clk_register_clkdev(clk, NULL, "nmk-i2c.1"); | 427 | clk_register_clkdev(clk, NULL, "nmk-i2c.1"); |
428 | 428 | ||
429 | clk = clk_reg_prcc_kclk("p1_msp0_kclk", "msp02clk", | 429 | clk = clk_reg_prcc_kclk("p1_msp0_kclk", "msp02clk", |
430 | U8500_CLKRST1_BASE, BIT(3), CLK_SET_RATE_GATE); | 430 | clkrst1_base, BIT(3), CLK_SET_RATE_GATE); |
431 | clk_register_clkdev(clk, NULL, "msp0"); | 431 | clk_register_clkdev(clk, NULL, "msp0"); |
432 | clk_register_clkdev(clk, NULL, "ux500-msp-i2s.0"); | 432 | clk_register_clkdev(clk, NULL, "ux500-msp-i2s.0"); |
433 | 433 | ||
434 | clk = clk_reg_prcc_kclk("p1_msp1_kclk", "msp1clk", | 434 | clk = clk_reg_prcc_kclk("p1_msp1_kclk", "msp1clk", |
435 | U8500_CLKRST1_BASE, BIT(4), CLK_SET_RATE_GATE); | 435 | clkrst1_base, BIT(4), CLK_SET_RATE_GATE); |
436 | clk_register_clkdev(clk, NULL, "msp1"); | 436 | clk_register_clkdev(clk, NULL, "msp1"); |
437 | clk_register_clkdev(clk, NULL, "ux500-msp-i2s.1"); | 437 | clk_register_clkdev(clk, NULL, "ux500-msp-i2s.1"); |
438 | 438 | ||
439 | clk = clk_reg_prcc_kclk("p1_sdi0_kclk", "sdmmcclk", | 439 | clk = clk_reg_prcc_kclk("p1_sdi0_kclk", "sdmmcclk", |
440 | U8500_CLKRST1_BASE, BIT(5), CLK_SET_RATE_GATE); | 440 | clkrst1_base, BIT(5), CLK_SET_RATE_GATE); |
441 | clk_register_clkdev(clk, NULL, "sdi0"); | 441 | clk_register_clkdev(clk, NULL, "sdi0"); |
442 | 442 | ||
443 | clk = clk_reg_prcc_kclk("p1_i2c2_kclk", "i2cclk", | 443 | clk = clk_reg_prcc_kclk("p1_i2c2_kclk", "i2cclk", |
444 | U8500_CLKRST1_BASE, BIT(6), CLK_SET_RATE_GATE); | 444 | clkrst1_base, BIT(6), CLK_SET_RATE_GATE); |
445 | clk_register_clkdev(clk, NULL, "nmk-i2c.2"); | 445 | clk_register_clkdev(clk, NULL, "nmk-i2c.2"); |
446 | 446 | ||
447 | clk = clk_reg_prcc_kclk("p1_slimbus0_kclk", "slimclk", | 447 | clk = clk_reg_prcc_kclk("p1_slimbus0_kclk", "slimclk", |
448 | U8500_CLKRST1_BASE, BIT(8), CLK_SET_RATE_GATE); | 448 | clkrst1_base, BIT(8), CLK_SET_RATE_GATE); |
449 | clk_register_clkdev(clk, NULL, "slimbus0"); | 449 | clk_register_clkdev(clk, NULL, "slimbus0"); |
450 | 450 | ||
451 | clk = clk_reg_prcc_kclk("p1_i2c4_kclk", "i2cclk", | 451 | clk = clk_reg_prcc_kclk("p1_i2c4_kclk", "i2cclk", |
452 | U8500_CLKRST1_BASE, BIT(9), CLK_SET_RATE_GATE); | 452 | clkrst1_base, BIT(9), CLK_SET_RATE_GATE); |
453 | clk_register_clkdev(clk, NULL, "nmk-i2c.4"); | 453 | clk_register_clkdev(clk, NULL, "nmk-i2c.4"); |
454 | 454 | ||
455 | clk = clk_reg_prcc_kclk("p1_msp3_kclk", "msp1clk", | 455 | clk = clk_reg_prcc_kclk("p1_msp3_kclk", "msp1clk", |
456 | U8500_CLKRST1_BASE, BIT(10), CLK_SET_RATE_GATE); | 456 | clkrst1_base, BIT(10), CLK_SET_RATE_GATE); |
457 | clk_register_clkdev(clk, NULL, "msp3"); | 457 | clk_register_clkdev(clk, NULL, "msp3"); |
458 | clk_register_clkdev(clk, NULL, "ux500-msp-i2s.3"); | 458 | clk_register_clkdev(clk, NULL, "ux500-msp-i2s.3"); |
459 | 459 | ||
460 | /* Periph2 */ | 460 | /* Periph2 */ |
461 | clk = clk_reg_prcc_kclk("p2_i2c3_kclk", "i2cclk", | 461 | clk = clk_reg_prcc_kclk("p2_i2c3_kclk", "i2cclk", |
462 | U8500_CLKRST2_BASE, BIT(0), CLK_SET_RATE_GATE); | 462 | clkrst2_base, BIT(0), CLK_SET_RATE_GATE); |
463 | clk_register_clkdev(clk, NULL, "nmk-i2c.3"); | 463 | clk_register_clkdev(clk, NULL, "nmk-i2c.3"); |
464 | 464 | ||
465 | clk = clk_reg_prcc_kclk("p2_sdi4_kclk", "sdmmcclk", | 465 | clk = clk_reg_prcc_kclk("p2_sdi4_kclk", "sdmmcclk", |
466 | U8500_CLKRST2_BASE, BIT(2), CLK_SET_RATE_GATE); | 466 | clkrst2_base, BIT(2), CLK_SET_RATE_GATE); |
467 | clk_register_clkdev(clk, NULL, "sdi4"); | 467 | clk_register_clkdev(clk, NULL, "sdi4"); |
468 | 468 | ||
469 | clk = clk_reg_prcc_kclk("p2_msp2_kclk", "msp02clk", | 469 | clk = clk_reg_prcc_kclk("p2_msp2_kclk", "msp02clk", |
470 | U8500_CLKRST2_BASE, BIT(3), CLK_SET_RATE_GATE); | 470 | clkrst2_base, BIT(3), CLK_SET_RATE_GATE); |
471 | clk_register_clkdev(clk, NULL, "msp2"); | 471 | clk_register_clkdev(clk, NULL, "msp2"); |
472 | clk_register_clkdev(clk, NULL, "ux500-msp-i2s.2"); | 472 | clk_register_clkdev(clk, NULL, "ux500-msp-i2s.2"); |
473 | 473 | ||
474 | clk = clk_reg_prcc_kclk("p2_sdi1_kclk", "sdmmcclk", | 474 | clk = clk_reg_prcc_kclk("p2_sdi1_kclk", "sdmmcclk", |
475 | U8500_CLKRST2_BASE, BIT(4), CLK_SET_RATE_GATE); | 475 | clkrst2_base, BIT(4), CLK_SET_RATE_GATE); |
476 | clk_register_clkdev(clk, NULL, "sdi1"); | 476 | clk_register_clkdev(clk, NULL, "sdi1"); |
477 | 477 | ||
478 | clk = clk_reg_prcc_kclk("p2_sdi3_kclk", "sdmmcclk", | 478 | clk = clk_reg_prcc_kclk("p2_sdi3_kclk", "sdmmcclk", |
479 | U8500_CLKRST2_BASE, BIT(5), CLK_SET_RATE_GATE); | 479 | clkrst2_base, BIT(5), CLK_SET_RATE_GATE); |
480 | clk_register_clkdev(clk, NULL, "sdi3"); | 480 | clk_register_clkdev(clk, NULL, "sdi3"); |
481 | 481 | ||
482 | /* Note that rate is received from parent. */ | 482 | /* Note that rate is received from parent. */ |
483 | clk = clk_reg_prcc_kclk("p2_ssirx_kclk", "hsirxclk", | 483 | clk = clk_reg_prcc_kclk("p2_ssirx_kclk", "hsirxclk", |
484 | U8500_CLKRST2_BASE, BIT(6), | 484 | clkrst2_base, BIT(6), |
485 | CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT); | 485 | CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT); |
486 | clk = clk_reg_prcc_kclk("p2_ssitx_kclk", "hsitxclk", | 486 | clk = clk_reg_prcc_kclk("p2_ssitx_kclk", "hsitxclk", |
487 | U8500_CLKRST2_BASE, BIT(7), | 487 | clkrst2_base, BIT(7), |
488 | CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT); | 488 | CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT); |
489 | 489 | ||
490 | /* Periph3 */ | 490 | /* Periph3 */ |
491 | clk = clk_reg_prcc_kclk("p3_ssp0_kclk", "sspclk", | 491 | clk = clk_reg_prcc_kclk("p3_ssp0_kclk", "sspclk", |
492 | U8500_CLKRST3_BASE, BIT(1), CLK_SET_RATE_GATE); | 492 | clkrst3_base, BIT(1), CLK_SET_RATE_GATE); |
493 | clk_register_clkdev(clk, NULL, "ssp0"); | 493 | clk_register_clkdev(clk, NULL, "ssp0"); |
494 | 494 | ||
495 | clk = clk_reg_prcc_kclk("p3_ssp1_kclk", "sspclk", | 495 | clk = clk_reg_prcc_kclk("p3_ssp1_kclk", "sspclk", |
496 | U8500_CLKRST3_BASE, BIT(2), CLK_SET_RATE_GATE); | 496 | clkrst3_base, BIT(2), CLK_SET_RATE_GATE); |
497 | clk_register_clkdev(clk, NULL, "ssp1"); | 497 | clk_register_clkdev(clk, NULL, "ssp1"); |
498 | 498 | ||
499 | clk = clk_reg_prcc_kclk("p3_i2c0_kclk", "i2cclk", | 499 | clk = clk_reg_prcc_kclk("p3_i2c0_kclk", "i2cclk", |
500 | U8500_CLKRST3_BASE, BIT(3), CLK_SET_RATE_GATE); | 500 | clkrst3_base, BIT(3), CLK_SET_RATE_GATE); |
501 | clk_register_clkdev(clk, NULL, "nmk-i2c.0"); | 501 | clk_register_clkdev(clk, NULL, "nmk-i2c.0"); |
502 | 502 | ||
503 | clk = clk_reg_prcc_kclk("p3_sdi2_kclk", "sdmmcclk", | 503 | clk = clk_reg_prcc_kclk("p3_sdi2_kclk", "sdmmcclk", |
504 | U8500_CLKRST3_BASE, BIT(4), CLK_SET_RATE_GATE); | 504 | clkrst3_base, BIT(4), CLK_SET_RATE_GATE); |
505 | clk_register_clkdev(clk, NULL, "sdi2"); | 505 | clk_register_clkdev(clk, NULL, "sdi2"); |
506 | 506 | ||
507 | clk = clk_reg_prcc_kclk("p3_ske_kclk", "rtc32k", | 507 | clk = clk_reg_prcc_kclk("p3_ske_kclk", "rtc32k", |
508 | U8500_CLKRST3_BASE, BIT(5), CLK_SET_RATE_GATE); | 508 | clkrst3_base, BIT(5), CLK_SET_RATE_GATE); |
509 | clk_register_clkdev(clk, NULL, "ske"); | 509 | clk_register_clkdev(clk, NULL, "ske"); |
510 | clk_register_clkdev(clk, NULL, "nmk-ske-keypad"); | 510 | clk_register_clkdev(clk, NULL, "nmk-ske-keypad"); |
511 | 511 | ||
512 | clk = clk_reg_prcc_kclk("p3_uart2_kclk", "uartclk", | 512 | clk = clk_reg_prcc_kclk("p3_uart2_kclk", "uartclk", |
513 | U8500_CLKRST3_BASE, BIT(6), CLK_SET_RATE_GATE); | 513 | clkrst3_base, BIT(6), CLK_SET_RATE_GATE); |
514 | clk_register_clkdev(clk, NULL, "uart2"); | 514 | clk_register_clkdev(clk, NULL, "uart2"); |
515 | 515 | ||
516 | clk = clk_reg_prcc_kclk("p3_sdi5_kclk", "sdmmcclk", | 516 | clk = clk_reg_prcc_kclk("p3_sdi5_kclk", "sdmmcclk", |
517 | U8500_CLKRST3_BASE, BIT(7), CLK_SET_RATE_GATE); | 517 | clkrst3_base, BIT(7), CLK_SET_RATE_GATE); |
518 | clk_register_clkdev(clk, NULL, "sdi5"); | 518 | clk_register_clkdev(clk, NULL, "sdi5"); |
519 | 519 | ||
520 | /* Periph6 */ | 520 | /* Periph6 */ |
521 | clk = clk_reg_prcc_kclk("p3_rng_kclk", "rngclk", | 521 | clk = clk_reg_prcc_kclk("p3_rng_kclk", "rngclk", |
522 | U8500_CLKRST6_BASE, BIT(0), CLK_SET_RATE_GATE); | 522 | clkrst6_base, BIT(0), CLK_SET_RATE_GATE); |
523 | clk_register_clkdev(clk, NULL, "rng"); | 523 | clk_register_clkdev(clk, NULL, "rng"); |
524 | } | 524 | } |
diff --git a/include/linux/platform_data/clk-ux500.h b/include/linux/platform_data/clk-ux500.h index 3af0da1f3be5..320d9c39ea0a 100644 --- a/include/linux/platform_data/clk-ux500.h +++ b/include/linux/platform_data/clk-ux500.h | |||
@@ -10,7 +10,8 @@ | |||
10 | #ifndef __CLK_UX500_H | 10 | #ifndef __CLK_UX500_H |
11 | #define __CLK_UX500_H | 11 | #define __CLK_UX500_H |
12 | 12 | ||
13 | void u8500_clk_init(void); | 13 | void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base, |
14 | u32 clkrst5_base, u32 clkrst6_base); | ||
14 | void u9540_clk_init(void); | 15 | void u9540_clk_init(void); |
15 | void u8540_clk_init(void); | 16 | void u8540_clk_init(void); |
16 | 17 | ||