summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier.adi@gmail.com>2009-02-04 11:49:45 +0300
committerBryan Wu <cooloney@kernel.org>2009-02-04 11:49:45 +0300
commitadab7eb883a0b0fb7f13b1d7b30b596139f6f40d (patch)
tree13891052c36d173d71964d2cf93d2ca52aac6643
parentaa9c33b496ca9434f26beaa1b447a6e2e5d8ad6a (diff)
downloadlinux-adab7eb883a0b0fb7f13b1d7b30b596139f6f40d.tar.xz
Blackfin arch: sync reboot handler with version in u-boot
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
-rw-r--r--arch/blackfin/kernel/reboot.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/arch/blackfin/kernel/reboot.c b/arch/blackfin/kernel/reboot.c
index eeee8cb43360..f7ca5789cccf 100644
--- a/arch/blackfin/kernel/reboot.c
+++ b/arch/blackfin/kernel/reboot.c
@@ -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 @@ static void _bfin_reset(void)
*/
__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 @@ static void _bfin_reset(void)
/* 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 @@ static void _bfin_reset(void)
: "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))