aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9rl.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2014-07-03 05:10:10 -0400
committerNicolas Ferre <nicolas.ferre@atmel.com>2014-08-25 10:05:08 -0400
commitd8dfa2d4e912c091c51c864af1e4b02b3bd6e9a2 (patch)
tree086785bc2e0c1a579da058a63d668add8e2c3d08 /arch/arm/mach-at91/at91sam9rl.c
parent65f2ce96a94d2a61fca486a48d9da30845b16d20 (diff)
ARM: at91: Probe the reset driver
Register the reset device in the right SoCs so that the reset driver is actually probed even in the old-style probing case. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/at91sam9rl.c')
-rw-r--r--arch/arm/mach-at91/at91sam9rl.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
index 878d5015daab..b03053e9b440 100644
--- a/arch/arm/mach-at91/at91sam9rl.c
+++ b/arch/arm/mach-at91/at91sam9rl.c
@@ -10,6 +10,7 @@
10 */ 10 */
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/platform_device.h>
13#include <linux/clk/at91_pmc.h> 14#include <linux/clk/at91_pmc.h>
14 15
15#include <asm/proc-fns.h> 16#include <asm/proc-fns.h>
@@ -332,6 +333,30 @@ static void __init at91sam9rl_initialize(void)
332 at91_gpio_init(at91sam9rl_gpio, 4); 333 at91_gpio_init(at91sam9rl_gpio, 4);
333} 334}
334 335
336static struct resource rstc_resources[] = {
337 [0] = {
338 .start = AT91SAM9RL_BASE_RSTC,
339 .end = AT91SAM9RL_BASE_RSTC + SZ_16 - 1,
340 .flags = IORESOURCE_MEM,
341 },
342 [1] = {
343 .start = AT91SAM9RL_BASE_SDRAMC,
344 .end = AT91SAM9RL_BASE_SDRAMC + SZ_512 - 1,
345 .flags = IORESOURCE_MEM,
346 },
347};
348
349static struct platform_device rstc_device = {
350 .name = "at91-sam9260-reset",
351 .resource = rstc_resources,
352 .num_resources = ARRAY_SIZE(rstc_resources),
353};
354
355static void __init at91sam9rl_register_devices(void)
356{
357 platform_device_register(&rstc_device);
358}
359
335/* -------------------------------------------------------------------- 360/* --------------------------------------------------------------------
336 * Interrupt initialization 361 * Interrupt initialization
337 * -------------------------------------------------------------------- */ 362 * -------------------------------------------------------------------- */
@@ -382,5 +407,6 @@ AT91_SOC_START(at91sam9rl)
382#if defined(CONFIG_OLD_CLK_AT91) 407#if defined(CONFIG_OLD_CLK_AT91)
383 .register_clocks = at91sam9rl_register_clocks, 408 .register_clocks = at91sam9rl_register_clocks,
384#endif 409#endif
410 .register_devices = at91sam9rl_register_devices,
385 .init = at91sam9rl_initialize, 411 .init = at91sam9rl_initialize,
386AT91_SOC_END 412AT91_SOC_END