ep93xx: Convert the watchdog driver into a platform device.
Subsystems (4)
PATCH 1/1 ep93xx: Convert the watchdog driver into a platform device.
Convert the ep93xx watchdog driver into a platform device and remove it's dependency on <mach/hardware.h>.
---
arch/arm/mach-ep93xx/core.c +15 -0
@@ -890,6 +890,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 */
@@ -905,6 +919,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
@@ -224,6 +224,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 +36 -14
113 lines not on this page · raw message
PATCH 1/1 ep93xx: Convert the watchdog driver into a platform device.
Hi,
...
arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h line 228
Quoted 11 lines
void
ep93xx_restart(char mode, const char *cmd)arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +1
-0@@ -224,6 +224,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)
Shouldn't this last define be removed after you added the new PHYS_BASE ?
Kind regards,
Wim.
PATCH 1/1 ep93xx: Convert the watchdog driver into a platform device.
Quoted 10 lines · Wim Van Sebroeck
Quoted 10 lines
void
ep93xx_restart(char mode, const char *cmd)diff --gita/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.hb/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.hindex c4a7b84..e9271a7 100644arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +0
-0@@ -224,6 +224,7 @@#define EP93XX_SYSCON_SYSCFG_LCSN1 (1<<0)#define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0)
Quoted 4 lines
arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h line 228
Quoted 2 lines
arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +1
-0+#define EP93XX_WATCHDOG_PHYS_BASE EP93XX_APB_PHYS(0x00140000)#define EP93XX_WATCHDOG_BASE EP93XX_APB_IOMEM(0x00140000)Shouldn't this last define be removed after you added the new
PHYS_BASE?
To make it easier on Ryan's other patches I left it for now.
After this patch and Ryan's others are applied I will go through the defines in the soc.h header and figure out which ones can be removed.
Thanks,
Hartley