Title: [6011] trunk/arch/blackfin/kernel/reboot.c: sync reboot handler with version in u-boot
Revision
6011
Author
vapier
Date
2009-01-13 10:24:52 -0600 (Tue, 13 Jan 2009)

Log Message

sync reboot handler with version in u-boot

Modified Paths


Diff

Modified: trunk/arch/blackfin/kernel/reboot.c (6010 => 6011)


--- trunk/arch/blackfin/kernel/reboot.c	2009-01-13 14:10:28 UTC (rev 6010)
+++ trunk/arch/blackfin/kernel/reboot.c	2009-01-13 16:24:52 UTC (rev 6011)
@@ -20,7 +20,7 @@
  * reset while the Core B bit (on dual core parts) is cleared by
  * the core reset.
  */
-__attribute__((l1_text))
+__attribute__ ((__l1_text__, __noreturn__))
 static void _bfin_reset(void)
 {
 	/* Wait for completion of "system" events such as cache line
@@ -30,7 +30,11 @@
 	 */
 	__builtin_bfin_ssync();
 
-	while (1) {
+	/* The bootrom checks to see how it was reset and will
+	 * automatically perform a software reset for us when
+	 * it starts executing after the core reset.
+	 */
+	if (ANOMALY_05000353 || ANOMALY_05000386) {
 		/* Initiate System software reset. */
 		bfin_write_SWRST(0x7);
 
@@ -50,6 +54,11 @@
 		/* Clear System software reset */
 		bfin_write_SWRST(0);
 
+		/* The BF526 ROM will crash during reset */
+#if defined(__ADSPBF522__) || defined(__ADSPBF524__) || defined(__ADSPBF526__)
+		bfin_read_SWRST();
+#endif
+
 		/* Wait for the SWRST write to complete.  Cannot rely on SSYNC
 		 * though as the System state is all reset now.
 		 */
@@ -60,22 +69,17 @@
 			: "a" (15 * 1)
 			: "LC1", "LB1", "LT1"
 		);
+	}
 
+	while (1)
 		/* Issue core reset */
 		asm("raise 1");
-	}
 }
 
+__attribute__ ((__noreturn__))
 static void bfin_reset(void)
 {
-	if (ANOMALY_05000353 || ANOMALY_05000386)
-		_bfin_reset();
-	else
-		/* the bootrom checks to see how it was reset and will
-		 * automatically perform a software reset for us when
-		 * it starts executing boot
-		 */
-		asm("raise 1;");
+	_bfin_reset();
 }
 
 __attribute__((weak))
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to