diff options
Diffstat (limited to 'arch/blackfin/kernel/reboot.c')
-rw-r--r-- | arch/blackfin/kernel/reboot.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/arch/blackfin/kernel/reboot.c b/arch/blackfin/kernel/reboot.c index eeee8cb43360..53d08dee8531 100644 --- a/arch/blackfin/kernel/reboot.c +++ b/arch/blackfin/kernel/reboot.c | |||
@@ -20,8 +20,8 @@ | |||
20 | * reset while the Core B bit (on dual core parts) is cleared by | 20 | * reset while the Core B bit (on dual core parts) is cleared by |
21 | * the core reset. | 21 | * the core reset. |
22 | */ | 22 | */ |
23 | __attribute__((l1_text)) | 23 | __attribute__ ((__l1_text__, __noreturn__)) |
24 | static void _bfin_reset(void) | 24 | static void bfin_reset(void) |
25 | { | 25 | { |
26 | /* Wait for completion of "system" events such as cache line | 26 | /* Wait for completion of "system" events such as cache line |
27 | * line fills so that we avoid infinite stalls later on as | 27 | * line fills so that we avoid infinite stalls later on as |
@@ -30,7 +30,11 @@ static void _bfin_reset(void) | |||
30 | */ | 30 | */ |
31 | __builtin_bfin_ssync(); | 31 | __builtin_bfin_ssync(); |
32 | 32 | ||
33 | while (1) { | 33 | /* The bootrom checks to see how it was reset and will |
34 | * automatically perform a software reset for us when | ||
35 | * it starts executing after the core reset. | ||
36 | */ | ||
37 | if (ANOMALY_05000353 || ANOMALY_05000386) { | ||
34 | /* Initiate System software reset. */ | 38 | /* Initiate System software reset. */ |
35 | bfin_write_SWRST(0x7); | 39 | bfin_write_SWRST(0x7); |
36 | 40 | ||
@@ -50,6 +54,11 @@ static void _bfin_reset(void) | |||
50 | /* Clear System software reset */ | 54 | /* Clear System software reset */ |
51 | bfin_write_SWRST(0); | 55 | bfin_write_SWRST(0); |
52 | 56 | ||
57 | /* The BF526 ROM will crash during reset */ | ||
58 | #if defined(__ADSPBF522__) || defined(__ADSPBF524__) || defined(__ADSPBF526__) | ||
59 | bfin_read_SWRST(); | ||
60 | #endif | ||
61 | |||
53 | /* Wait for the SWRST write to complete. Cannot rely on SSYNC | 62 | /* Wait for the SWRST write to complete. Cannot rely on SSYNC |
54 | * though as the System state is all reset now. | 63 | * though as the System state is all reset now. |
55 | */ | 64 | */ |
@@ -60,22 +69,11 @@ static void _bfin_reset(void) | |||
60 | : "a" (15 * 1) | 69 | : "a" (15 * 1) |
61 | : "LC1", "LB1", "LT1" | 70 | : "LC1", "LB1", "LT1" |
62 | ); | 71 | ); |
72 | } | ||
63 | 73 | ||
74 | while (1) | ||
64 | /* Issue core reset */ | 75 | /* Issue core reset */ |
65 | asm("raise 1"); | 76 | asm("raise 1"); |
66 | } | ||
67 | } | ||
68 | |||
69 | static void bfin_reset(void) | ||
70 | { | ||
71 | if (ANOMALY_05000353 || ANOMALY_05000386) | ||
72 | _bfin_reset(); | ||
73 | else | ||
74 | /* the bootrom checks to see how it was reset and will | ||
75 | * automatically perform a software reset for us when | ||
76 | * it starts executing boot | ||
77 | */ | ||
78 | asm("raise 1;"); | ||
79 | } | 77 | } |
80 | 78 | ||
81 | __attribute__((weak)) | 79 | __attribute__((weak)) |