Skip to contentSkip to conversation

ep93xx: Convert the watchdog driver into a platform device.

PATCH Superseded Ryan Mallon 2 participants 2 messages Mar 12, 2012 – Mar 13, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v4 5/11 ep93xx: Convert the watchdog driver into a platform device.

From: H Hartley Sweeten <[email protected]>

From: H Hartley Sweeten <[email protected]>

Convert the ep93xx watchdog driver into a platform device and remove it's dependency on <mach/hardware.h>.

---
This patch has already been applied to Wim's watchdog tree. It has included here for completeness because this patch series is against v3.3-rc7.

 arch/arm/mach-ep93xx/core.c                     |   15 +++++++
 arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h |    1 +
 drivers/watchdog/ep93xx_wdt.c                   |   51 ++++++++++++++++------
 3 files changed, 53 insertions(+), 14 deletions(-)
arch/arm/mach-ep93xx/core.c +15 -0
index c73e299..3134baf 100644
@@ -889,6 +889,20 @@ void __init ep93xx_register_ac97(void)
 	platform_device_register(&ep93xx_pcm_device);
 }
 
+/*************************************************************************
+ * EP93xx Watchdog
+ *************************************************************************/
+static struct resource ep93xx_wdt_resources[] = {
+	DEFINE_RES_MEM(EP93XX_WATCHDOG_PHYS_BASE, 0x08),
+};
+
+static struct platform_device ep93xx_wdt_device = {
+	.name		= "ep93xx-wdt",
+	.id		= -1,
+	.num_resources	= ARRAY_SIZE(ep93xx_wdt_resources),
+	.resource	= ep93xx_wdt_resources,
+};
+
 void __init ep93xx_init_devices(void)
 {
 	/* Disallow access to MaverickCrunch initially */
@@ -904,6 +918,7 @@ void __init ep93xx_init_devices(void)
 	platform_device_register(&ep93xx_rtc_device);
 	platform_device_register(&ep93xx_ohci_device);
 	platform_device_register(&ep93xx_leds);
+	platform_device_register(&ep93xx_wdt_device);
 }
 
 void ep93xx_restart(char mode, const char *cmd)
arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +1 -0
index 72b8687..f28afcf 100644
@@ -182,6 +182,7 @@
 #define EP93XX_SYSCON_SYSCFG_LCSN1	(1<<0)
 #define EP93XX_SYSCON_SWLOCK		EP93XX_SYSCON_REG(0xc0)
 
+#define EP93XX_WATCHDOG_PHYS_BASE	EP93XX_APB_PHYS(0x00140000)
 #define EP93XX_WATCHDOG_BASE		EP93XX_APB_IOMEM(0x00140000)
 
 
drivers/watchdog/ep93xx_wdt.c +37 -14

114 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#1 lore raw

PATCH v4 5/11 ep93xx: Convert the watchdog driver into a platform device.

Quoted 4 lines · Ryan Mallon

From: H Hartley Sweeten <[email protected]>

From: H Hartley Sweeten <[email protected]>

Quoted 8 lines

Convert the ep93xx watchdog driver into a platform device and remove it's dependency on <mach/hardware.h>.

Note that you have an extra From: line in the beginning.

Arnd