From 5e00d3783dd362a34c9816bb582103c9833e4643 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sun, 15 May 2011 13:32:47 +0200 Subject: ARM: orion: Consolidate the platform data setup for the watchdog. Signed-off-by: Andrew Lunn Signed-off-by: Nicolas Pitre --- arch/arm/plat-orion/common.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'arch/arm/plat-orion/common.c') diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 2afe79d1a273..65022094747a 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -18,6 +18,7 @@ #include #include #include +#include /* 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); +} -- cgit v1.2.3