commit: http://blackfin.uclinux.org/git/?p=u-boot;a=commitdiff;h=28b3d2d5e0acb29eecf692c3cbc79283142bcb62
branch: http://blackfin.uclinux.org/git/?p=u-boot;a=shortlog;h=refs/heads/trunk

Signed-off-by: Sonic Zhang <sonic.zh...@analog.com>
---
 arch/blackfin/cpu/initcode.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/arch/blackfin/cpu/initcode.c b/arch/blackfin/cpu/initcode.c
index 0a2d7d8..1a3b1c8 100644
--- a/arch/blackfin/cpu/initcode.c
+++ b/arch/blackfin/cpu/initcode.c
@@ -458,16 +458,23 @@ 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__
-		int i;
+		/* Reset system event controller */
 		bfin_write_SEC_GCTL(0x2);
-		while (i++ < 100000);
+		bfin_write_SEC_CCTL(0x2);
+		SSYNC();
+
+		/* Enable fault event input and system reset action in fault
+		 * controller. Route watchdog timeout event to fault interface.
+		 */
 		bfin_write_SEC_FCTL(0xc1);
+		/* Enable watchdog interrupt source */
 		bfin_write_SEC_SCTL(2, bfin_read_SEC_SCTL(2) | 0x6);
+		SSYNC();
 
-		bfin_write_SEC_CCTL(0x2);
-		while (i++ < 100000);
+		/* Enable system event controller */
 		bfin_write_SEC_GCTL(0x1);
 		bfin_write_SEC_CCTL(0x1);
+		SSYNC();
 #endif
 		bfin_write_WDOG_CTL(WDDIS);
 		SSYNC();
_______________________________________________
U-Boot-commits mailing list
U-Boot-commits@blackfin.uclinux.org
https://blackfin.uclinux.org/mailman/listinfo/u-boot-commits

Reply via email to