diff options
author | Florian Fainelli <florian@openwrt.org> | 2010-05-11 11:20:09 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-05-21 21:31:22 +0100 |
commit | 9c1b013a3951671e219c32ca056fc07381a9e113 (patch) | |
tree | 225f47b9a7a8d00df23947b2a4524797b46061b1 /arch | |
parent | 3e1bf29f73ccb31b99215476b0278f477db1a247 (diff) | |
download | linux-9c1b013a3951671e219c32ca056fc07381a9e113.tar.bz2 |
MIPS: AR7: use ar7_has_high_vlynq() to determine watchdog base address
Instead of doing yet another switch/case on the chip_id, use existing
inline function to set the watchdog base address.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1211/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/ar7/platform.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c index 2fafc78e5ce1..1d4a466ccb6f 100644 --- a/arch/mips/ar7/platform.c +++ b/arch/mips/ar7/platform.c @@ -576,7 +576,6 @@ static int __init ar7_register_devices(void) { void __iomem *bootcr; u32 val; - u16 chip_id; int res; res = ar7_register_uarts(); @@ -635,18 +634,10 @@ static int __init ar7_register_devices(void) val = readl(bootcr); iounmap(bootcr); if (val & AR7_WDT_HW_ENA) { - chip_id = ar7_chip_id(); - switch (chip_id) { - case AR7_CHIP_7100: - case AR7_CHIP_7200: - ar7_wdt_res.start = AR7_REGS_WDT; - break; - case AR7_CHIP_7300: + if (ar7_has_high_vlynq()) ar7_wdt_res.start = UR8_REGS_WDT; - break; - default: - break; - } + else + ar7_wdt_res.start = AR7_REGS_WDT; ar7_wdt_res.end = ar7_wdt_res.start + 0x20; res = platform_device_register(&ar7_wdt); |