diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2012-01-22 04:01:16 -0500 |
---|---|---|
committer | Ryan Mallon <rmallon@gmail.com> | 2012-03-13 20:41:11 -0400 |
commit | 73303d129201de7af7fa837597e9c470c5efa71f (patch) | |
tree | 0990de666d5c3cb4a95182b4f163cd0086e40e37 /arch/arm/mach-ep93xx | |
parent | 0fd1958050e92c859152e775e548284582335d25 (diff) |
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>.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-ep93xx')
-rw-r--r-- | arch/arm/mach-ep93xx/core.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index c73e299b08a5..3134baf6c7a4 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -889,6 +889,20 @@ void __init ep93xx_register_ac97(void) | |||
889 | platform_device_register(&ep93xx_pcm_device); | 889 | platform_device_register(&ep93xx_pcm_device); |
890 | } | 890 | } |
891 | 891 | ||
892 | /************************************************************************* | ||
893 | * EP93xx Watchdog | ||
894 | *************************************************************************/ | ||
895 | static struct resource ep93xx_wdt_resources[] = { | ||
896 | DEFINE_RES_MEM(EP93XX_WATCHDOG_PHYS_BASE, 0x08), | ||
897 | }; | ||
898 | |||
899 | static struct platform_device ep93xx_wdt_device = { | ||
900 | .name = "ep93xx-wdt", | ||
901 | .id = -1, | ||
902 | .num_resources = ARRAY_SIZE(ep93xx_wdt_resources), | ||
903 | .resource = ep93xx_wdt_resources, | ||
904 | }; | ||
905 | |||
892 | void __init ep93xx_init_devices(void) | 906 | void __init ep93xx_init_devices(void) |
893 | { | 907 | { |
894 | /* Disallow access to MaverickCrunch initially */ | 908 | /* Disallow access to MaverickCrunch initially */ |
@@ -904,6 +918,7 @@ void __init ep93xx_init_devices(void) | |||
904 | platform_device_register(&ep93xx_rtc_device); | 918 | platform_device_register(&ep93xx_rtc_device); |
905 | platform_device_register(&ep93xx_ohci_device); | 919 | platform_device_register(&ep93xx_ohci_device); |
906 | platform_device_register(&ep93xx_leds); | 920 | platform_device_register(&ep93xx_leds); |
921 | platform_device_register(&ep93xx_wdt_device); | ||
907 | } | 922 | } |
908 | 923 | ||
909 | void ep93xx_restart(char mode, const char *cmd) | 924 | void ep93xx_restart(char mode, const char *cmd) |
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h index 72b86878e196..f28afcf29fc1 100644 --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | |||
@@ -182,6 +182,7 @@ | |||
182 | #define EP93XX_SYSCON_SYSCFG_LCSN1 (1<<0) | 182 | #define EP93XX_SYSCON_SYSCFG_LCSN1 (1<<0) |
183 | #define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0) | 183 | #define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0) |
184 | 184 | ||
185 | #define EP93XX_WATCHDOG_PHYS_BASE EP93XX_APB_PHYS(0x00140000) | ||
185 | #define EP93XX_WATCHDOG_BASE EP93XX_APB_IOMEM(0x00140000) | 186 | #define EP93XX_WATCHDOG_BASE EP93XX_APB_IOMEM(0x00140000) |
186 | 187 | ||
187 | 188 | ||