aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorGabor Juhos2012-12-27 08:38:26 -0600
committerWim Van Sebroeck2013-03-01 05:22:38 -0600
commit09f5100a592d11dad06b218f41d560ff1f87f666 (patch)
tree61dc65a90c6344b8273f8d383f3ad34d3054e2f3 /arch/mips
parent0f2ad9ed7c6fecb008372e8a709595a2a21059aa (diff)
downloadam43-linux-kernel-09f5100a592d11dad06b218f41d560ff1f87f666.tar.gz
am43-linux-kernel-09f5100a592d11dad06b218f41d560ff1f87f666.tar.xz
am43-linux-kernel-09f5100a592d11dad06b218f41d560ff1f87f666.zip
watchdog: ath79_wdt: get register base from platform device's resources
The ath79_wdt driver uses a fixed memory address currently. Although this is working with each currently supported SoCs, but this may change in the future. Additionally, the driver includes platform specific header files in order to be able to get the memory base of the watchdog device. The patch adds a memory resource to the platform device, and converts the driver to get the base address of the watchdog device from that. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/ath79/dev-common.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/mips/ath79/dev-common.c b/arch/mips/ath79/dev-common.c
index 2093b1b2a1d..ea3a8140e72 100644
--- a/arch/mips/ath79/dev-common.c
+++ b/arch/mips/ath79/dev-common.c
@@ -103,5 +103,13 @@ void __init ath79_register_uart(void)
103 103
104void __init ath79_register_wdt(void) 104void __init ath79_register_wdt(void)
105{ 105{
106 platform_device_register_simple("ath79-wdt", -1, NULL, 0); 106 struct resource res;
107
108 memset(&res, 0, sizeof(res));
109
110 res.flags = IORESOURCE_MEM;
111 res.start = AR71XX_RESET_BASE + AR71XX_RESET_REG_WDOG_CTRL;
112 res.end = res.start + 0x8 - 1;
113
114 platform_device_register_simple("ath79-wdt", -1, &res, 1);
107} 115}