23
23
__attribute__ ((__l1_text__, __noreturn__))
24
24
static void bfin_reset(void)
26
if (!ANOMALY_05000353 && !ANOMALY_05000386)
27
bfrom_SoftReset((void *)(L1_SCRATCH_START + L1_SCRATCH_LENGTH - 20));
26
29
/* Wait for completion of "system" events such as cache line
27
30
* line fills so that we avoid infinite stalls later on as
28
31
* much as possible. This code is in L1, so it won't trigger
31
34
__builtin_bfin_ssync();
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
/* Initiate System software reset. */
37
bfin_write_SWRST(0x7);
39
/* Due to the way reset is handled in the hardware, we need
40
* to delay for 10 SCLKS. The only reliable way to do this is
41
* to calculate the CCLK/SCLK ratio and multiply 10. For now,
42
* we'll assume worse case which is a 1:15 ratio.
37
if (ANOMALY_05000353 || ANOMALY_05000386) {
38
/* Initiate System software reset. */
39
bfin_write_SWRST(0x7);
41
/* Due to the way reset is handled in the hardware, we need
42
* to delay for 10 SCLKS. The only reliable way to do this is
43
* to calculate the CCLK/SCLK ratio and multiply 10. For now,
44
* we'll assume worse case which is a 1:15 ratio.
47
"LSETUP (1f, 1f) LC0 = %0\n"
54
/* Clear System software reset */
57
/* The BF526 ROM will crash during reset */
45
"LSETUP (1f, 1f) LC0 = %0\n"
52
/* Clear System software reset */
55
/* The BF526 ROM will crash during reset */
58
56
#if defined(__ADSPBF522__) || defined(__ADSPBF524__) || defined(__ADSPBF526__)
62
/* Wait for the SWRST write to complete. Cannot rely on SSYNC
63
* though as the System state is all reset now.
66
"LSETUP (1f, 1f) LC1 = %0\n"
60
/* Wait for the SWRST write to complete. Cannot rely on SSYNC
61
* though as the System state is all reset now.
64
"LSETUP (1f, 1f) LC1 = %0\n"
75
72
/* Issue core reset */