Blackfin: use on-chip reset func with newer parts
Turns out the documentation is wrong and doing "RAISE 1" does not result in a software reset, only a core reset. So when the on-chip rom has a functioning reset helper, use it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
f91c69168a
commit
803103925b
1 changed files with 31 additions and 34 deletions
|
@ -23,6 +23,9 @@
|
||||||
__attribute__ ((__l1_text__, __noreturn__))
|
__attribute__ ((__l1_text__, __noreturn__))
|
||||||
static void bfin_reset(void)
|
static void bfin_reset(void)
|
||||||
{
|
{
|
||||||
|
if (!ANOMALY_05000353 && !ANOMALY_05000386)
|
||||||
|
bfrom_SoftReset((void *)(L1_SCRATCH_START + L1_SCRATCH_LENGTH - 20));
|
||||||
|
|
||||||
/* Wait for completion of "system" events such as cache line
|
/* Wait for completion of "system" events such as cache line
|
||||||
* line fills so that we avoid infinite stalls later on as
|
* line fills so that we avoid infinite stalls later on as
|
||||||
* much as possible. This code is in L1, so it won't trigger
|
* much as possible. This code is in L1, so it won't trigger
|
||||||
|
@ -30,11 +33,6 @@ static void bfin_reset(void)
|
||||||
*/
|
*/
|
||||||
__builtin_bfin_ssync();
|
__builtin_bfin_ssync();
|
||||||
|
|
||||||
/* 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. */
|
/* Initiate System software reset. */
|
||||||
bfin_write_SWRST(0x7);
|
bfin_write_SWRST(0x7);
|
||||||
|
|
||||||
|
@ -69,7 +67,6 @@ static void bfin_reset(void)
|
||||||
: "a" (15 * 1)
|
: "a" (15 * 1)
|
||||||
: "LC1", "LB1", "LT1"
|
: "LC1", "LB1", "LT1"
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
/* Issue core reset */
|
/* Issue core reset */
|
||||||
|
|
Reference in a new issue