diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-07-03 11:10:10 +0200 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2014-08-25 16:05:08 +0200 |
commit | d8dfa2d4e912c091c51c864af1e4b02b3bd6e9a2 (patch) | |
tree | 086785bc2e0c1a579da058a63d668add8e2c3d08 /arch/arm/mach-at91/at91sam9263.c | |
parent | 65f2ce96a94d2a61fca486a48d9da30845b16d20 (diff) | |
download | op-kernel-dev-d8dfa2d4e912c091c51c864af1e4b02b3bd6e9a2.zip op-kernel-dev-d8dfa2d4e912c091c51c864af1e4b02b3bd6e9a2.tar.gz |
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/at91sam9263.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9263.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index 810fa5f..e34ce7a 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c @@ -11,6 +11,7 @@ */ #include <linux/module.h> +#include <linux/platform_device.h> #include <linux/clk/at91_pmc.h> #include <asm/proc-fns.h> @@ -344,6 +345,30 @@ static void __init at91sam9263_initialize(void) at91_gpio_init(at91sam9263_gpio, 5); } +static struct resource rstc_resources[] = { + [0] = { + .start = AT91SAM9263_BASE_RSTC, + .end = AT91SAM9263_BASE_RSTC + SZ_16 - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = AT91SAM9263_BASE_SDRAMC0, + .end = AT91SAM9263_BASE_SDRAMC0 + SZ_512 - 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device rstc_device = { + .name = "at91-sam9260-reset", + .resource = rstc_resources, + .num_resources = ARRAY_SIZE(rstc_resources), +}; + +static void __init at91sam9263_register_devices(void) +{ + platform_device_register(&rstc_device); +} + /* -------------------------------------------------------------------- * Interrupt initialization * -------------------------------------------------------------------- */ @@ -392,5 +417,6 @@ AT91_SOC_START(at91sam9263) .extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1), .ioremap_registers = at91sam9263_ioremap_registers, .register_clocks = at91sam9263_register_clocks, + .register_devices = at91sam9263_register_devices, .init = at91sam9263_initialize, AT91_SOC_END |