diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9rl.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index c0d5474706f8..57f12d86c0e6 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c | |||
@@ -26,13 +26,14 @@ | |||
26 | #include "at91_rstc.h" | 26 | #include "at91_rstc.h" |
27 | #include "soc.h" | 27 | #include "soc.h" |
28 | #include "generic.h" | 28 | #include "generic.h" |
29 | #include "clock.h" | ||
30 | #include "sam9_smc.h" | 29 | #include "sam9_smc.h" |
31 | #include "pm.h" | 30 | #include "pm.h" |
32 | 31 | ||
33 | /* -------------------------------------------------------------------- | 32 | /* -------------------------------------------------------------------- |
34 | * Clocks | 33 | * Clocks |
35 | * -------------------------------------------------------------------- */ | 34 | * -------------------------------------------------------------------- */ |
35 | #if defined(CONFIG_OLD_CLK_AT91) | ||
36 | #include "clock.h" | ||
36 | 37 | ||
37 | /* | 38 | /* |
38 | * The peripheral clocks. | 39 | * The peripheral clocks. |
@@ -197,6 +198,24 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
197 | CLKDEV_CON_ID("pioB", &pioB_clk), | 198 | CLKDEV_CON_ID("pioB", &pioB_clk), |
198 | CLKDEV_CON_ID("pioC", &pioC_clk), | 199 | CLKDEV_CON_ID("pioC", &pioC_clk), |
199 | CLKDEV_CON_ID("pioD", &pioD_clk), | 200 | CLKDEV_CON_ID("pioD", &pioD_clk), |
201 | /* more lookup table for DT entries */ | ||
202 | CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck), | ||
203 | CLKDEV_CON_DEV_ID("usart", "fffb0000.serial", &usart0_clk), | ||
204 | CLKDEV_CON_DEV_ID("usart", "ffffb400.serial", &usart1_clk), | ||
205 | CLKDEV_CON_DEV_ID("usart", "ffffb800.serial", &usart2_clk), | ||
206 | CLKDEV_CON_DEV_ID("usart", "ffffbc00.serial", &usart3_clk), | ||
207 | CLKDEV_CON_DEV_ID("t0_clk", "fffa0000.timer", &tc0_clk), | ||
208 | CLKDEV_CON_DEV_ID("t1_clk", "fffa0000.timer", &tc1_clk), | ||
209 | CLKDEV_CON_DEV_ID("t2_clk", "fffa0000.timer", &tc2_clk), | ||
210 | CLKDEV_CON_DEV_ID("mci_clk", "fffa4000.mmc", &mmc_clk), | ||
211 | CLKDEV_CON_DEV_ID(NULL, "fffa8000.i2c", &twi0_clk), | ||
212 | CLKDEV_CON_DEV_ID(NULL, "fffac000.i2c", &twi1_clk), | ||
213 | CLKDEV_CON_DEV_ID(NULL, "fffc8000.pwm", &pwm_clk), | ||
214 | CLKDEV_CON_DEV_ID(NULL, "ffffc800.pwm", &pwm_clk), | ||
215 | CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioA_clk), | ||
216 | CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioB_clk), | ||
217 | CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioC_clk), | ||
218 | CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioD_clk), | ||
200 | }; | 219 | }; |
201 | 220 | ||
202 | static struct clk_lookup usart_clocks_lookups[] = { | 221 | static struct clk_lookup usart_clocks_lookups[] = { |
@@ -239,6 +258,7 @@ static void __init at91sam9rl_register_clocks(void) | |||
239 | clk_register(&pck0); | 258 | clk_register(&pck0); |
240 | clk_register(&pck1); | 259 | clk_register(&pck1); |
241 | } | 260 | } |
261 | #endif | ||
242 | 262 | ||
243 | /* -------------------------------------------------------------------- | 263 | /* -------------------------------------------------------------------- |
244 | * GPIO | 264 | * GPIO |
@@ -351,6 +371,8 @@ AT91_SOC_START(at91sam9rl) | |||
351 | .default_irq_priority = at91sam9rl_default_irq_priority, | 371 | .default_irq_priority = at91sam9rl_default_irq_priority, |
352 | .extern_irq = (1 << AT91SAM9RL_ID_IRQ0), | 372 | .extern_irq = (1 << AT91SAM9RL_ID_IRQ0), |
353 | .ioremap_registers = at91sam9rl_ioremap_registers, | 373 | .ioremap_registers = at91sam9rl_ioremap_registers, |
374 | #if defined(CONFIG_OLD_CLK_AT91) | ||
354 | .register_clocks = at91sam9rl_register_clocks, | 375 | .register_clocks = at91sam9rl_register_clocks, |
376 | #endif | ||
355 | .init = at91sam9rl_initialize, | 377 | .init = at91sam9rl_initialize, |
356 | AT91_SOC_END | 378 | AT91_SOC_END |