Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80310392 authored by Mike Frysinger's avatar Mike Frysinger
Browse files

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: default avatarMike Frysinger <vapier@gentoo.org>
parent f91c6916
Loading
Loading
Loading
Loading
+31 −34
Original line number Diff line number Diff line
@@ -23,6 +23,9 @@
__attribute__ ((__l1_text__, __noreturn__))
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
	 * line fills so that we avoid infinite stalls later on as
	 * 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();

	/* 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);

@@ -69,7 +67,6 @@ static void bfin_reset(void)
		: "a" (15 * 1)
		: "LC1", "LB1", "LT1"
	);
	}

	while (1)
		/* Issue core reset */