Skip to content

Commit

Permalink
Blackfin arch: Fix BUG -- BF533 + 0.5 silicon + MPU + UART PIO -> crash
Browse files Browse the repository at this point in the history
Apply ANOMALY_05000283 & ANOMALY_05000315
Workaround also to the EXCEPTION path.

Cover evt_ivhw also with ANOMALY_05000315
The Workaround needs to be prior to accesses (either read or write) to
any system MMR.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
  • Loading branch information
Michael Hennerich authored and Bryan Wu committed Oct 9, 2008
1 parent 49f7253 commit 5e9e768
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions arch/blackfin/mach-common/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,15 @@ ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/
[--sp] = ASTAT;
[--sp] = (R7:6,P5:4);

#if ANOMALY_05000283 || ANOMALY_05000315
cc = r7 == r7;
p5.h = HI(CHIPID);
p5.l = LO(CHIPID);
if cc jump 1f;
r7.l = W[p5];
1:
#endif

#ifdef CONFIG_DEBUG_DOUBLEFAULT
/*
* Save these registers, as they are only valid in exception context
Expand Down Expand Up @@ -1020,6 +1029,15 @@ ENTRY(_early_trap)
SAVE_ALL_SYS
trace_buffer_stop(p0,r0);

#if ANOMALY_05000283 || ANOMALY_05000315
cc = r5 == r5;
p4.h = HI(CHIPID);
p4.l = LO(CHIPID);
if cc jump 1f;
r5.l = W[p4];
1:
#endif

/* Turn caches off, to ensure we don't get double exceptions */

P4.L = LO(IMEM_CONTROL);
Expand Down
2 changes: 1 addition & 1 deletion arch/blackfin/mach-common/interrupt.S
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ ENTRY(_evt_ivhw)
fp = 0;
#endif

#if ANOMALY_05000283
#if ANOMALY_05000283 || ANOMALY_05000315
cc = r7 == r7;
p5.h = HI(CHIPID);
p5.l = LO(CHIPID);
Expand Down

0 comments on commit 5e9e768

Please sign in to comment.