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>
This commit is contained in:
Arnd Bergmann
2015-12-02 22:27:03 +01:00
committed by Gregory CLEMENT
parent 8005c49d9a
commit 06f3008a6a
4 changed files with 30 additions and 24 deletions

View File

@@ -375,6 +375,23 @@ void __init dove_setup_cpu_wins(void)
DOVE_SCRATCHPAD_SIZE);
}
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 __maybe_unused orion_wdt_init(void)
{
platform_device_register(&orion_wdt_device);
}
void __init dove_init(void)
{
pr_info("Dove 88AP510 SoC, TCLK = %d MHz.\n",