aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/devices.c
diff options
context:
space:
mode:
authorMark A. Greer <mgreer@mvista.com>2009-04-15 15:40:21 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-05-26 11:20:31 -0400
commit951d6f6d703110790256abfce03ced117d2dcc6b (patch)
tree598b30a93ff618f56579d2c1218088bd908e5125 /arch/arm/mach-davinci/devices.c
parentf64691b3ab795268072e76ddb89290b6277cdf33 (diff)
davinci: Add watchdog base address flexibility
The watchdog code currently hardcodes the base address of the timer its using. To support new SoCs, make it support timers at any address. Use the soc_info structure to do this. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/devices.c')
-rw-r--r--arch/arm/mach-davinci/devices.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c
index 36c528ff30f9..7ebf6713f6a2 100644
--- a/arch/arm/mach-davinci/devices.c
+++ b/arch/arm/mach-davinci/devices.c
@@ -216,8 +216,6 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
216 216
217static struct resource wdt_resources[] = { 217static struct resource wdt_resources[] = {
218 { 218 {
219 .start = 0x01c21c00,
220 .end = 0x01c21fff,
221 .flags = IORESOURCE_MEM, 219 .flags = IORESOURCE_MEM,
222 }, 220 },
223}; 221};
@@ -231,6 +229,11 @@ struct platform_device davinci_wdt_device = {
231 229
232static void davinci_init_wdt(void) 230static void davinci_init_wdt(void)
233{ 231{
232 struct davinci_soc_info *soc_info = &davinci_soc_info;
233
234 wdt_resources[0].start = (resource_size_t)soc_info->wdt_base;
235 wdt_resources[0].end = (resource_size_t)soc_info->wdt_base + SZ_1K - 1;
236
234 platform_device_register(&davinci_wdt_device); 237 platform_device_register(&davinci_wdt_device);
235} 238}
236 239