aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/mach-mt7620/cpu.c')
-rw-r--r--arch/mips/mach-mt7620/cpu.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/mips/mach-mt7620/cpu.c b/arch/mips/mach-mt7620/cpu.c
index 87cc973b75..9e0ca716f7 100644
--- a/arch/mips/mach-mt7620/cpu.c
+++ b/arch/mips/mach-mt7620/cpu.c
@@ -89,9 +89,21 @@ void watchdog_reset(void)
89 wdt_reset(watchdog_dev); 89 wdt_reset(watchdog_dev);
90 } 90 }
91} 91}
92#endif
92 93
93int arch_misc_init(void) 94int arch_misc_init(void)
94{ 95{
96 /*
97 * It has been noticed, that sometimes the d-cache is not in a
98 * "clean-state" when U-Boot is running on MT7688. This was
99 * detected when using the ethernet driver (which uses d-cache)
100 * and a TFTP command does not complete. Flushing the complete
101 * d-cache (again?) here seems to fix this issue.
102 */
103 flush_dcache_range(gd->bd->bi_memstart,
104 gd->bd->bi_memstart + gd->ram_size - 1);
105
106#ifdef CONFIG_WATCHDOG
95 /* Init watchdog */ 107 /* Init watchdog */
96 if (uclass_get_device_by_seq(UCLASS_WDT, 0, &watchdog_dev)) { 108 if (uclass_get_device_by_seq(UCLASS_WDT, 0, &watchdog_dev)) {
97 debug("Watchdog: Not found by seq!\n"); 109 debug("Watchdog: Not found by seq!\n");
@@ -103,7 +115,7 @@ int arch_misc_init(void)
103 115
104 wdt_start(watchdog_dev, 60000, 0); /* 60 seconds */ 116 wdt_start(watchdog_dev, 60000, 0); /* 60 seconds */
105 printf("Watchdog: Started\n"); 117 printf("Watchdog: Started\n");
118#endif
106 119
107 return 0; 120 return 0;
108} 121}
109#endif