]> git.sur5r.net Git - u-boot/commitdiff
dm: mips: Fix lb60 WDT control
authorMarek Vasut <marex@denx.de>
Sun, 12 Aug 2012 14:53:35 +0000 (16:53 +0200)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Fri, 17 Aug 2012 18:13:48 +0000 (20:13 +0200)
Write the TSCR register via 32bit write instead of 16bit one.
The register is 32bit wide and bit 16 is being set, triggering
gcc overflow error and making the code broken.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel <zpxu@ingenic.cn>
Cc: Shinya Kuribayashi <skuribay@pobox.com>
Cc: Xiangfu Liu <xiangfu@openmobilefree.net>
arch/mips/cpu/xburst/cpu.c

index e97634159796547c5420708397e7f6e64351d11e..ddcbfaa47c93f858d7a68f6fb9812ed35cb57636 100644 (file)
@@ -62,7 +62,7 @@ void __attribute__((weak)) _machine_restart(void)
 
        writew(100, &wdt->tdr); /* wdt_set_data(100) */
        writew(0, &wdt->tcnt); /* wdt_set_count(0); */
-       writew(TCU_TSSR_WDTSC, &tcu->tscr); /* tcu_start_wdt_clock */
+       writel(TCU_TSSR_WDTSC, &tcu->tscr); /* tcu_start_wdt_clock */
        writeb(readb(&wdt->tcer) | WDT_TCER_TCEN, &wdt->tcer); /* wdt start */
 
        while (1)