All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] AR7: use ar7_has_high_vlynq() to determine watchdog base address
@ 2010-05-11  9:20 Florian Fainelli
  0 siblings, 0 replies; only message in thread
From: Florian Fainelli @ 2010-05-11  9:20 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle

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>
---
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c
index 2fafc78..1d4a466 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);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-11  9:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-11  9:20 [PATCH 1/2] AR7: use ar7_has_high_vlynq() to determine watchdog base address Florian Fainelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.