diff options
author | Ezequiel Garcia <ezequiel.garcia@free-electrons.com> | 2014-02-10 18:00:25 -0500 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2014-02-21 22:43:23 -0500 |
commit | 868eb61602d9c020fc9e21b42f3ccd301b36b94d (patch) | |
tree | b26c070e5d546b2c4e18f87ec4d1f00237b6331c /arch/arm/plat-orion/common.c | |
parent | e97662e1e28da0da0702db213931d8f9a580970a (diff) |
watchdog: orion: Make RSTOUT register a separate resource
In order to support other SoC, it's required to distinguish
the 'control' timer register, from the 'rstout' register
that enables system reset on watchdog expiration.
To prevent a compatibility break, this commit adds a fallback
to a hardcoded RSTOUT address.
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Tested-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm/plat-orion/common.c')
-rw-r--r-- | arch/arm/plat-orion/common.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 830ff07f3385..3ec6e8e8d368 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c | |||
@@ -595,14 +595,16 @@ void __init orion_spi_1_init(unsigned long mapbase) | |||
595 | /***************************************************************************** | 595 | /***************************************************************************** |
596 | * Watchdog | 596 | * Watchdog |
597 | ****************************************************************************/ | 597 | ****************************************************************************/ |
598 | static struct resource orion_wdt_resource = | 598 | static struct resource orion_wdt_resource[] = { |
599 | DEFINE_RES_MEM(TIMER_PHYS_BASE, 0x28); | 599 | DEFINE_RES_MEM(TIMER_PHYS_BASE, 0x04), |
600 | DEFINE_RES_MEM(RSTOUTn_MASK_PHYS, 0x04), | ||
601 | }; | ||
600 | 602 | ||
601 | static struct platform_device orion_wdt_device = { | 603 | static struct platform_device orion_wdt_device = { |
602 | .name = "orion_wdt", | 604 | .name = "orion_wdt", |
603 | .id = -1, | 605 | .id = -1, |
604 | .num_resources = 1, | 606 | .num_resources = ARRAY_SIZE(orion_wdt_resource), |
605 | .resource = &orion_wdt_resource, | 607 | .resource = orion_wdt_resource, |
606 | }; | 608 | }; |
607 | 609 | ||
608 | void __init orion_wdt_init(void) | 610 | void __init orion_wdt_init(void) |