aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9260.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/at91sam9260.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/at91sam9260.c')
-rw-r--r--arch/arm/mach-at91/at91sam9260.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index 3477ba94c4c5..fd6b45a85966 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -11,6 +11,7 @@
11 */ 11 */
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/platform_device.h>
14#include <linux/clk/at91_pmc.h> 15#include <linux/clk/at91_pmc.h>
15 16
16#include <asm/proc-fns.h> 17#include <asm/proc-fns.h>
@@ -362,6 +363,30 @@ static void __init at91sam9260_initialize(void)
362 at91_gpio_init(at91sam9260_gpio, 3); 363 at91_gpio_init(at91sam9260_gpio, 3);
363} 364}
364 365
366static struct resource rstc_resources[] = {
367 [0] = {
368 .start = AT91SAM9260_BASE_RSTC,
369 .end = AT91SAM9260_BASE_RSTC + SZ_16 - 1,
370 .flags = IORESOURCE_MEM,
371 },
372 [1] = {
373 .start = AT91SAM9260_BASE_SDRAMC,
374 .end = AT91SAM9260_BASE_SDRAMC + SZ_512 - 1,
375 .flags = IORESOURCE_MEM,
376 },
377};
378
379static struct platform_device rstc_device = {
380 .name = "at91-sam9260-reset",
381 .resource = rstc_resources,
382 .num_resources = ARRAY_SIZE(rstc_resources),
383};
384
385static void __init at91sam9260_register_devices(void)
386{
387 platform_device_register(&rstc_device);
388}
389
365/* -------------------------------------------------------------------- 390/* --------------------------------------------------------------------
366 * Interrupt initialization 391 * Interrupt initialization
367 * -------------------------------------------------------------------- */ 392 * -------------------------------------------------------------------- */
@@ -411,5 +436,6 @@ AT91_SOC_START(at91sam9260)
411 | (1 << AT91SAM9260_ID_IRQ2), 436 | (1 << AT91SAM9260_ID_IRQ2),
412 .ioremap_registers = at91sam9260_ioremap_registers, 437 .ioremap_registers = at91sam9260_ioremap_registers,
413 .register_clocks = at91sam9260_register_clocks, 438 .register_clocks = at91sam9260_register_clocks,
439 .register_devices = at91sam9260_register_devices,
414 .init = at91sam9260_initialize, 440 .init = at91sam9260_initialize,
415AT91_SOC_END 441AT91_SOC_END