aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/plat-omap/devices.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-10-13 10:52:30 +0200
committerIngo Molnar <mingo@elte.hu>2008-10-13 10:52:30 +0200
commitc493756e2a8a78bcaae30668317890dcfe86e7c3 (patch)
tree8fb40782e79472ed882ff2098d4dd295557278ee /arch/arm/plat-omap/devices.c
parent0d15504f16f68725e4635aa85411015d1c573b0a (diff)
parent4480f15b3306f43bbb0310d461142b4e897ca45b (diff)
Merge branch 'linus' into oprofile
Conflicts: arch/x86/kernel/apic_32.c include/linux/pci_ids.h
Diffstat (limited to 'arch/arm/plat-omap/devices.c')
-rw-r--r--arch/arm/plat-omap/devices.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index 01da719a745..97187fa0ae5 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -13,9 +13,9 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
+#include <linux/io.h>
#include <mach/hardware.h>
-#include <asm/io.h>
#include <asm/mach-types.h>
#include <asm/mach/map.h>
@@ -441,16 +441,8 @@ static inline void omap_init_uwire(void) {}
#if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE)
-#ifdef CONFIG_ARCH_OMAP24XX
-#define OMAP_WDT_BASE 0x48022000
-#else
-#define OMAP_WDT_BASE 0xfffeb000
-#endif
-
static struct resource wdt_resources[] = {
{
- .start = OMAP_WDT_BASE,
- .end = OMAP_WDT_BASE + 0x4f,
.flags = IORESOURCE_MEM,
},
};
@@ -464,6 +456,19 @@ static struct platform_device omap_wdt_device = {
static void omap_init_wdt(void)
{
+ if (cpu_is_omap16xx())
+ wdt_resources[0].start = 0xfffeb000;
+ else if (cpu_is_omap2420())
+ wdt_resources[0].start = 0x48022000; /* WDT2 */
+ else if (cpu_is_omap2430())
+ wdt_resources[0].start = 0x49016000; /* WDT2 */
+ else if (cpu_is_omap343x())
+ wdt_resources[0].start = 0x48314000; /* WDT2 */
+ else
+ return;
+
+ wdt_resources[0].end = wdt_resources[0].start + 0x4f;
+
(void) platform_device_register(&omap_wdt_device);
}
#else