summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-12-02 22:27:03 +0100
committerGregory CLEMENT <gregory.clement@free-electrons.com>2015-12-07 18:09:32 +0100
commit06f3008a6a7454389a82495eb1fc132c2b0710f6 (patch)
tree9b304f00b1332bcf2dc73bcd9fd76507e8877c2b /arch/arm/mach-orion5x
parent8005c49d9aea74d382f474ce11afbbc7d7130bec (diff)
downloadlinux-06f3008a6a7454389a82495eb1fc132c2b0710f6.tar.gz
linux-06f3008a6a7454389a82495eb1fc132c2b0710f6.tar.bz2
linux-06f3008a6a7454389a82495eb1fc132c2b0710f6.zip
ARM: orion: move watchdog setup to mach-orion5x
The watchdog device node is created in plat-orion/common.c but depends on the bridge address that is platform specific, so as a preparation for orion multiplatform support, we move it out of the common code into orion5x and dove. At the moment, dove does not use the watchdog, so I'm marking the function as __maybe_unused for the moment. The compiler will be able to compile out the device definition this way, and we can easily add it later. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Diffstat (limited to 'arch/arm/mach-orion5x')
-rw-r--r--arch/arm/mach-orion5x/common.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 6bbb7b55c6d1..2b7889e3b7bc 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -184,9 +184,21 @@ static void __init orion5x_crypto_init(void)
/*****************************************************************************
* Watchdog
****************************************************************************/
+static struct resource orion_wdt_resource[] = {
+ DEFINE_RES_MEM(TIMER_PHYS_BASE, 0x04),
+ DEFINE_RES_MEM(RSTOUTn_MASK_PHYS, 0x04),
+};
+
+static struct platform_device orion_wdt_device = {
+ .name = "orion_wdt",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(orion_wdt_resource),
+ .resource = orion_wdt_resource,
+};
+
static void __init orion5x_wdt_init(void)
{
- orion_wdt_init();
+ platform_device_register(&orion_wdt_device);
}