linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: at91: rm9200 add system timer resources to watchdog
@ 2014-10-31 20:45 Alexandre Belloni
  2014-10-31 20:45 ` [PATCH 2/2] watchdog: at91rm9200 remove mach/ header dependency Alexandre Belloni
  2014-10-31 20:50 ` [PATCH 1/2] ARM: at91: rm9200 add system timer resources to watchdog Arnd Bergmann
  0 siblings, 2 replies; 9+ messages in thread
From: Alexandre Belloni @ 2014-10-31 20:45 UTC (permalink / raw)
  To: linux-arm-kernel

To be able to make the watchdog driver independent from the mach/ includes, pass
the system timer register space as a resource.

Also, change the name to avoid conflicting with the at91sam9 watchdog driver.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/mach-at91/at91rm9200_devices.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index 74f1eaf97801..4add0481adab 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -719,10 +719,19 @@ static void __init at91_add_device_rtc(void) {}
  * -------------------------------------------------------------------- */
 
 #if defined(CONFIG_AT91RM9200_WATCHDOG) || defined(CONFIG_AT91RM9200_WATCHDOG_MODULE)
+static struct resource wdt_resources[] = {
+	[0] = {
+		.start	= AT91RM9200_BASE_ST,
+		.end	= AT91RM9200_BASE_ST + SZ_256 - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+};
+
 static struct platform_device at91rm9200_wdt_device = {
-	.name		= "at91_wdt",
+	.name		= "at91rm9200_wdt",
 	.id		= -1,
-	.num_resources	= 0,
+	.resource	= wdt_resources,
+	.num_resources	= 1,
 };
 
 static void __init at91_add_device_watchdog(void)
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-11-05  9:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-31 20:45 [PATCH 1/2] ARM: at91: rm9200 add system timer resources to watchdog Alexandre Belloni
2014-10-31 20:45 ` [PATCH 2/2] watchdog: at91rm9200 remove mach/ header dependency Alexandre Belloni
2014-10-31 20:53   ` Arnd Bergmann
2014-10-31 20:59     ` Alexandre Belloni
2014-10-31 20:50 ` [PATCH 1/2] ARM: at91: rm9200 add system timer resources to watchdog Arnd Bergmann
2014-10-31 20:57   ` Alexandre Belloni
2014-10-31 21:36     ` Arnd Bergmann
2014-11-04 22:41       ` Alexandre Belloni
2014-11-05  9:58         ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).