diff options
-rw-r--r-- | arch/mips/ar7/platform.c | 9 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-ar7/ar7.h | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c index e2278c04459d..835f3f0319ca 100644 --- a/arch/mips/ar7/platform.c +++ b/arch/mips/ar7/platform.c | |||
@@ -503,6 +503,7 @@ static int __init ar7_register_devices(void) | |||
503 | { | 503 | { |
504 | u16 chip_id; | 504 | u16 chip_id; |
505 | int res; | 505 | int res; |
506 | u32 *bootcr, val; | ||
506 | #ifdef CONFIG_SERIAL_8250 | 507 | #ifdef CONFIG_SERIAL_8250 |
507 | static struct uart_port uart_port[2]; | 508 | static struct uart_port uart_port[2]; |
508 | 509 | ||
@@ -595,7 +596,13 @@ static int __init ar7_register_devices(void) | |||
595 | 596 | ||
596 | ar7_wdt_res.end = ar7_wdt_res.start + 0x20; | 597 | ar7_wdt_res.end = ar7_wdt_res.start + 0x20; |
597 | 598 | ||
598 | res = platform_device_register(&ar7_wdt); | 599 | bootcr = (u32 *)ioremap_nocache(AR7_REGS_DCL, 4); |
600 | val = *bootcr; | ||
601 | iounmap(bootcr); | ||
602 | |||
603 | /* Register watchdog only if enabled in hardware */ | ||
604 | if (val & AR7_WDT_HW_ENA) | ||
605 | res = platform_device_register(&ar7_wdt); | ||
599 | 606 | ||
600 | return res; | 607 | return res; |
601 | } | 608 | } |
diff --git a/arch/mips/include/asm/mach-ar7/ar7.h b/arch/mips/include/asm/mach-ar7/ar7.h index de71694614de..21cbbc706448 100644 --- a/arch/mips/include/asm/mach-ar7/ar7.h +++ b/arch/mips/include/asm/mach-ar7/ar7.h | |||
@@ -78,6 +78,9 @@ | |||
78 | #define AR7_REF_CLOCK 25000000 | 78 | #define AR7_REF_CLOCK 25000000 |
79 | #define AR7_XTAL_CLOCK 24000000 | 79 | #define AR7_XTAL_CLOCK 24000000 |
80 | 80 | ||
81 | /* DCL */ | ||
82 | #define AR7_WDT_HW_ENA 0x10 | ||
83 | |||
81 | struct plat_cpmac_data { | 84 | struct plat_cpmac_data { |
82 | int reset_bit; | 85 | int reset_bit; |
83 | int power_bit; | 86 | int power_bit; |