aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-03-17 10:38:07 -0400
committerArnd Bergmann <arnd@arndb.de>2014-03-17 10:38:07 -0400
commit397d77a5669d39c6ee5d373e3a51131959fac21e (patch)
treeb417b96ca2d2a45b4ab87f1fba76a8c97ab24509 /arch/arm/mach-at91
parent0daba17de771388a004148a357f7c63d648b0b3b (diff)
parent050208dfd0d725c307e6ad3442d9f809501091cd (diff)
Merge tag 'at91-cleanup' of git://github.com/at91linux/linux-at91 into next/cleanup
Merge "First batch of AT91 cleanup for 3.15" from Nicolas Ferre: - some updates on the defconfig front - two SoCs converted to Device Tree: sam9261 and sam9rl (with use of CCF!) - a little PWM clock update that goes on top of this * tag 'at91-cleanup' of git://github.com/at91linux/linux-at91: ARM: at91: add PWM clock ARM: at91: move sam9261 SoC to common clk ARM: at91: prepare common clk transition for sam9261 SoC ARM: at91: updated the at91_dt_defconfig with support for the ADS7846 ARM: at91: dt: sam9261: Device Tree support for the at91sam9261ek ARM: at91: dt: defconfig: Added the sam9261 to the list of DT-enabled SOCs ARM: at91: dt: Add at91sam9261 dt SoC support ARM: at91: switch sam9rl to common clock framework ARM: at91/dt: define main clk frequency of at91sam9rlek ARM: at91/dt: define at91sam9rl clocks ARM: at91: prepare common clk transition for sam9rl SoCs ARM: at91: prepare sam9 dt boards transition to common clk ARM: at91: dt: sam9rl: Device Tree for the at91sam9rlek ARM: at91/defconfig: Add the sam9rl to the list of DT-enabled SOCs ARM: at91: Add at91sam9rl DT SoC support ARM: at91: prepare at91sam9rl DT transition ARM: at91/defconfig: refresh at91sam9260_9g20_defconfig ARM: at91/defconfig: remove useless configuration in at91sam9260_9g20_defconfig ARM: at91/defconfig: refresh at91sam9rl_defconfig Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r--arch/arm/mach-at91/Kconfig2
-rw-r--r--arch/arm/mach-at91/at91sam9261.c25
-rw-r--r--arch/arm/mach-at91/at91sam9263.c1
-rw-r--r--arch/arm/mach-at91/at91sam9g45.c1
-rw-r--r--arch/arm/mach-at91/at91sam9n12.c1
-rw-r--r--arch/arm/mach-at91/at91sam9rl.c24
-rw-r--r--arch/arm/mach-at91/at91sam9x5.c1
-rw-r--r--arch/arm/mach-at91/board-dt-sam9.c11
8 files changed, 60 insertions, 6 deletions
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 4f0e800e7e71..ae6617e3ed0b 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -119,7 +119,6 @@ config SOC_AT91SAM9261
119 select HAVE_AT91_DBGU0 119 select HAVE_AT91_DBGU0
120 select HAVE_FB_ATMEL 120 select HAVE_FB_ATMEL
121 select SOC_AT91SAM9 121 select SOC_AT91SAM9
122 select AT91_USE_OLD_CLK
123 select HAVE_AT91_USB_CLK 122 select HAVE_AT91_USB_CLK
124 help 123 help
125 Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC. 124 Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC.
@@ -137,7 +136,6 @@ config SOC_AT91SAM9RL
137 select HAVE_AT91_DBGU0 136 select HAVE_AT91_DBGU0
138 select HAVE_FB_ATMEL 137 select HAVE_FB_ATMEL
139 select SOC_AT91SAM9 138 select SOC_AT91SAM9
140 select AT91_USE_OLD_CLK
141 select HAVE_AT91_UTMI 139 select HAVE_AT91_UTMI
142 140
143config SOC_AT91SAM9G45 141config SOC_AT91SAM9G45
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index 48b51f796d6a..fb164a5d04a9 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -26,10 +26,12 @@
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
32#if defined(CONFIG_OLD_CLK_AT91)
33#include "clock.h"
34
33/* -------------------------------------------------------------------- 35/* --------------------------------------------------------------------
34 * Clocks 36 * Clocks
35 * -------------------------------------------------------------------- */ 37 * -------------------------------------------------------------------- */
@@ -190,6 +192,23 @@ static struct clk_lookup periph_clocks_lookups[] = {
190 CLKDEV_CON_ID("pioA", &pioA_clk), 192 CLKDEV_CON_ID("pioA", &pioA_clk),
191 CLKDEV_CON_ID("pioB", &pioB_clk), 193 CLKDEV_CON_ID("pioB", &pioB_clk),
192 CLKDEV_CON_ID("pioC", &pioC_clk), 194 CLKDEV_CON_ID("pioC", &pioC_clk),
195 /* more lookup table for DT entries */
196 CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck),
197 CLKDEV_CON_DEV_ID("usart", "fffb0000.serial", &usart0_clk),
198 CLKDEV_CON_DEV_ID("usart", "ffffb400.serial", &usart1_clk),
199 CLKDEV_CON_DEV_ID("usart", "fff94000.serial", &usart2_clk),
200 CLKDEV_CON_DEV_ID("t0_clk", "fffa0000.timer", &tc0_clk),
201 CLKDEV_CON_DEV_ID("t1_clk", "fffa0000.timer", &tc1_clk),
202 CLKDEV_CON_DEV_ID("t2_clk", "fffa0000.timer", &tc2_clk),
203 CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &hck0),
204 CLKDEV_CON_DEV_ID("hclk", "600000.fb", &hck1),
205 CLKDEV_CON_DEV_ID("spi_clk", "fffc8000.spi", &spi0_clk),
206 CLKDEV_CON_DEV_ID("spi_clk", "fffcc000.spi", &spi1_clk),
207 CLKDEV_CON_DEV_ID("mci_clk", "fffa8000.mmc", &mmc_clk),
208 CLKDEV_CON_DEV_ID(NULL, "fffac000.i2c", &twi_clk),
209 CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioA_clk),
210 CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioB_clk),
211 CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioC_clk),
193}; 212};
194 213
195static struct clk_lookup usart_clocks_lookups[] = { 214static struct clk_lookup usart_clocks_lookups[] = {
@@ -248,7 +267,9 @@ static void __init at91sam9261_register_clocks(void)
248 clk_register(&hck0); 267 clk_register(&hck0);
249 clk_register(&hck1); 268 clk_register(&hck1);
250} 269}
251 270#else
271#define at91sam9261_register_clocks NULL
272#endif
252/* -------------------------------------------------------------------- 273/* --------------------------------------------------------------------
253 * GPIO 274 * GPIO
254 * -------------------------------------------------------------------- */ 275 * -------------------------------------------------------------------- */
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index 486530c3973b..f30290572293 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -224,6 +224,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
224 CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioCDE_clk), 224 CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioCDE_clk),
225 CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioCDE_clk), 225 CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioCDE_clk),
226 CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioCDE_clk), 226 CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioCDE_clk),
227 CLKDEV_CON_DEV_ID(NULL, "fffb8000.pwm", &pwm_clk),
227}; 228};
228 229
229static struct clk_lookup usart_clocks_lookups[] = { 230static struct clk_lookup usart_clocks_lookups[] = {
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 8c11696f606e..5e6f498db0a8 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -285,6 +285,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
285 CLKDEV_CON_ID("pioE", &pioDE_clk), 285 CLKDEV_CON_ID("pioE", &pioDE_clk),
286 /* Fake adc clock */ 286 /* Fake adc clock */
287 CLKDEV_CON_ID("adc_clk", &tsc_clk), 287 CLKDEV_CON_ID("adc_clk", &tsc_clk),
288 CLKDEV_CON_DEV_ID(NULL, "fffb8000.pwm", &pwm_clk),
288}; 289};
289 290
290static struct clk_lookup usart_clocks_lookups[] = { 291static struct clk_lookup usart_clocks_lookups[] = {
diff --git a/arch/arm/mach-at91/at91sam9n12.c b/arch/arm/mach-at91/at91sam9n12.c
index 4ef088c62eab..f2ea7b0a02da 100644
--- a/arch/arm/mach-at91/at91sam9n12.c
+++ b/arch/arm/mach-at91/at91sam9n12.c
@@ -182,6 +182,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
182 /* additional fake clock for macb_hclk */ 182 /* additional fake clock for macb_hclk */
183 CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &uhp_clk), 183 CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &uhp_clk),
184 CLKDEV_CON_DEV_ID("ohci_clk", "500000.ohci", &uhp_clk), 184 CLKDEV_CON_DEV_ID("ohci_clk", "500000.ohci", &uhp_clk),
185 CLKDEV_CON_DEV_ID(NULL, "f8034000.pwm", &pwm_clk),
185}; 186};
186 187
187/* 188/*
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
202static struct clk_lookup usart_clocks_lookups[] = { 221static 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,
356AT91_SOC_END 378AT91_SOC_END
diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c
index 3e8ec26e39dc..9ad781d5ee7c 100644
--- a/arch/arm/mach-at91/at91sam9x5.c
+++ b/arch/arm/mach-at91/at91sam9x5.c
@@ -253,6 +253,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
253 CLKDEV_CON_DEV_ID("ehci_clk", "700000.ehci", &uhphs_clk), 253 CLKDEV_CON_DEV_ID("ehci_clk", "700000.ehci", &uhphs_clk),
254 CLKDEV_CON_DEV_ID("hclk", "500000.gadget", &utmi_clk), 254 CLKDEV_CON_DEV_ID("hclk", "500000.gadget", &utmi_clk),
255 CLKDEV_CON_DEV_ID("pclk", "500000.gadget", &udphs_clk), 255 CLKDEV_CON_DEV_ID("pclk", "500000.gadget", &udphs_clk),
256 CLKDEV_CON_DEV_ID(NULL, "f8034000.pwm", &pwm_clk),
256}; 257};
257 258
258/* 259/*
diff --git a/arch/arm/mach-at91/board-dt-sam9.c b/arch/arm/mach-at91/board-dt-sam9.c
index 3dab868b02fa..575b0be66ca8 100644
--- a/arch/arm/mach-at91/board-dt-sam9.c
+++ b/arch/arm/mach-at91/board-dt-sam9.c
@@ -13,6 +13,7 @@
13#include <linux/gpio.h> 13#include <linux/gpio.h>
14#include <linux/of.h> 14#include <linux/of.h>
15#include <linux/of_irq.h> 15#include <linux/of_irq.h>
16#include <linux/clk-provider.h>
16 17
17#include <asm/setup.h> 18#include <asm/setup.h>
18#include <asm/irq.h> 19#include <asm/irq.h>
@@ -25,6 +26,14 @@
25#include "generic.h" 26#include "generic.h"
26 27
27 28
29static void __init sam9_dt_timer_init(void)
30{
31#if defined(CONFIG_COMMON_CLK)
32 of_clk_init(NULL);
33#endif
34 at91sam926x_pit_init();
35}
36
28static const struct of_device_id irq_of_match[] __initconst = { 37static const struct of_device_id irq_of_match[] __initconst = {
29 38
30 { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init }, 39 { .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init },
@@ -43,7 +52,7 @@ static const char *at91_dt_board_compat[] __initdata = {
43 52
44DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)") 53DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)")
45 /* Maintainer: Atmel */ 54 /* Maintainer: Atmel */
46 .init_time = at91sam926x_pit_init, 55 .init_time = sam9_dt_timer_init,
47 .map_io = at91_map_io, 56 .map_io = at91_map_io,
48 .handle_irq = at91_aic_handle_irq, 57 .handle_irq = at91_aic_handle_irq,
49 .init_early = at91_dt_initialize, 58 .init_early = at91_dt_initialize,