diff options
author | Andrew Lunn <andrew@lunn.ch> | 2011-05-15 13:32:47 +0200 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2011-05-16 15:10:03 -0400 |
commit | 5e00d3783dd362a34c9816bb582103c9833e4643 (patch) | |
tree | fae2485cc6ab26c1f1138b473488111e4b7f5af1 /arch/arm/plat-orion | |
parent | 980f9f601ad456dc5a699bf526b6bd894957bad3 (diff) | |
download | kernel_goldelico_gta04-5e00d3783dd362a34c9816bb582103c9833e4643.zip kernel_goldelico_gta04-5e00d3783dd362a34c9816bb582103c9833e4643.tar.gz kernel_goldelico_gta04-5e00d3783dd362a34c9816bb582103c9833e4643.tar.bz2 |
ARM: orion: Consolidate the platform data setup for the watchdog.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm/plat-orion')
-rw-r--r-- | arch/arm/plat-orion/common.c | 21 | ||||
-rw-r--r-- | arch/arm/plat-orion/include/plat/common.h | 2 |
2 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 2afe79d..6502209 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -18,6 +18,7 @@ #include <linux/mv643xx_i2c.h> #include <net/dsa.h> #include <linux/spi/orion_spi.h> +#include <plat/orion_wdt.h> /* Fill in the resources structure and link it into the platform device structure. There is always a memory region, and nearly @@ -564,3 +565,23 @@ void __init orion_spi_1_init(unsigned long mapbase, mapbase, SZ_512 - 1, NO_IRQ); platform_device_register(&orion_spi_1); } + +/***************************************************************************** + * Watchdog + ****************************************************************************/ +static struct orion_wdt_platform_data orion_wdt_data; + +static struct platform_device orion_wdt_device = { + .name = "orion_wdt", + .id = -1, + .dev = { + .platform_data = &orion_wdt_data, + }, + .num_resources = 0, +}; + +void __init orion_wdt_init(unsigned long tclk) +{ + orion_wdt_data.tclk = tclk; + platform_device_register(&orion_wdt_device); +} diff --git a/arch/arm/plat-orion/include/plat/common.h b/arch/arm/plat-orion/include/plat/common.h index e72c146..38ae4bf 100644 --- a/arch/arm/plat-orion/include/plat/common.h +++ b/arch/arm/plat-orion/include/plat/common.h @@ -79,4 +79,6 @@ void __init orion_spi_init(unsigned long mapbase, void __init orion_spi_1_init(unsigned long mapbase, unsigned long tclk); + +void __init orion_wdt_init(unsigned long tclk); #endif |