diff options
author | Felipe Balbi <felipe.balbi@nokia.com> | 2008-09-19 21:14:01 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2008-10-10 09:11:10 -0400 |
commit | 2817142f31bfbf26c216bf4f9192540c81b2d071 (patch) | |
tree | 4cc6e07cadde49821499800f91310e12e49d0ce9 /arch/arm | |
parent | e6bb42e3d669afbeb4c971994614bcf241687666 (diff) |
[WATCHDOG] omap_wdt.c: sync linux-omap changes
These are changes that have been sitting in linux-omap
and were never sent upstream.
Hopefully, it'll never happen again at least for this
driver.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/plat-omap/devices.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index 01da719a7453..cc62cec1b75a 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -441,16 +441,8 @@ static inline void omap_init_uwire(void) {} | |||
441 | 441 | ||
442 | #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE) | 442 | #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE) |
443 | 443 | ||
444 | #ifdef CONFIG_ARCH_OMAP24XX | ||
445 | #define OMAP_WDT_BASE 0x48022000 | ||
446 | #else | ||
447 | #define OMAP_WDT_BASE 0xfffeb000 | ||
448 | #endif | ||
449 | |||
450 | static struct resource wdt_resources[] = { | 444 | static struct resource wdt_resources[] = { |
451 | { | 445 | { |
452 | .start = OMAP_WDT_BASE, | ||
453 | .end = OMAP_WDT_BASE + 0x4f, | ||
454 | .flags = IORESOURCE_MEM, | 446 | .flags = IORESOURCE_MEM, |
455 | }, | 447 | }, |
456 | }; | 448 | }; |
@@ -464,6 +456,19 @@ static struct platform_device omap_wdt_device = { | |||
464 | 456 | ||
465 | static void omap_init_wdt(void) | 457 | static void omap_init_wdt(void) |
466 | { | 458 | { |
459 | if (cpu_is_omap16xx()) | ||
460 | wdt_resources[0].start = 0xfffeb000; | ||
461 | else if (cpu_is_omap2420()) | ||
462 | wdt_resources[0].start = 0x48022000; /* WDT2 */ | ||
463 | else if (cpu_is_omap2430()) | ||
464 | wdt_resources[0].start = 0x49016000; /* WDT2 */ | ||
465 | else if (cpu_is_omap343x()) | ||
466 | wdt_resources[0].start = 0x48314000; /* WDT2 */ | ||
467 | else | ||
468 | return; | ||
469 | |||
470 | wdt_resources[0].end = wdt_resources[0].start + 0x4f; | ||
471 | |||
467 | (void) platform_device_register(&omap_wdt_device); | 472 | (void) platform_device_register(&omap_wdt_device); |
468 | } | 473 | } |
469 | #else | 474 | #else |