summaryrefslogtreecommitdiff
path: root/arch/blackfin/cpu/initcode.c
diff options
context:
space:
mode:
authorBob Liu <lliubbo@gmail.com>2011-12-27 15:05:53 +0800
committersonic <sonic@sonic-linuxvm.(none)>2013-03-04 13:42:07 +0800
commit49c2da53b7aa63f68118fa9ffa5c5e546440ebb2 (patch)
tree3034e5856175c7e276b1425a1a28e493b1ad99b3 /arch/blackfin/cpu/initcode.c
parent4a207e8b9a1ecc3e87d5a63bb5442dbcd50bd4b6 (diff)
downloadu-boot-imx-49c2da53b7aa63f68118fa9ffa5c5e546440ebb2.zip
u-boot-imx-49c2da53b7aa63f68118fa9ffa5c5e546440ebb2.tar.gz
u-boot-imx-49c2da53b7aa63f68118fa9ffa5c5e546440ebb2.tar.bz2
blackfin: bf60x: add hw watchdog support
Signed-off-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
Diffstat (limited to 'arch/blackfin/cpu/initcode.c')
-rw-r--r--arch/blackfin/cpu/initcode.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/blackfin/cpu/initcode.c b/arch/blackfin/cpu/initcode.c
index a717148..ce9a435 100644
--- a/arch/blackfin/cpu/initcode.c
+++ b/arch/blackfin/cpu/initcode.c
@@ -461,8 +461,21 @@ program_early_devices(ADI_BOOT_DATA *bs, uint *sdivB, uint *divB, uint *vcoB)
*/
if (CONFIG_BFIN_BOOT_MODE != BFIN_BOOT_BYPASS) {
serial_putc('e');
+#ifdef __ADSPBF60x__
+ bfin_write_SEC_GCTL(0x2);
+ SSYNC();
+ bfin_write_SEC_FCTL(0xc1);
+ bfin_write_SEC_SCTL(2, bfin_read_SEC_SCTL(2) | 0x6);
+
+ bfin_write_SEC_CCTL(0x2);
+ SSYNC();
+ bfin_write_SEC_GCTL(0x1);
+ bfin_write_SEC_CCTL(0x1);
+#endif
bfin_write_WDOG_CNT(MSEC_TO_SCLK(CONFIG_HW_WATCHDOG_TIMEOUT_INITCODE));
+#if CONFIG_BFIN_BOOT_MODE != BFIN_BOOT_UART
bfin_write_WDOG_CTL(0);
+#endif
serial_putc('f');
}
#endif