Skip to content

Commit

Permalink
blackfin: bf60x: anomaly: Add a temporary anomaly 0501001
Browse files Browse the repository at this point in the history
Add a temporary anomaly 0501001 for data loss in MMR reading if interrupted.
Add work around for bfin serial driver as well.

Signed-off-by: Sonic Zhang <[email protected]>
Signed-off-by: Bob Liu <[email protected]>
  • Loading branch information
sonicz authored and aet00 committed May 21, 2012
1 parent 8bf7135 commit 913f2f2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions arch/blackfin/include/asm/bfin_serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,19 @@ struct bfin_uart_regs {
#define UART_GET_GCTL(p) UART_GET_CTL(p)
#define UART_GET_LCR(p) UART_GET_CTL(p)
#define UART_GET_MCR(p) UART_GET_CTL(p)
#if ANOMALY_05001001
#define UART_GET_STAT(p) \
({ \
u32 __ret; \
unsigned long flags; \
flags = hard_local_irq_save(); \
__ret = bfin_read32(port_membase(p) + OFFSET_STAT); \
hard_local_irq_restore(flags); \
__ret; \
})
#else
#define UART_GET_STAT(p) bfin_read32(port_membase(p) + OFFSET_STAT)
#endif
#define UART_GET_MSR(p) UART_GET_STAT(p)

#define UART_PUT_CHAR(p, v) bfin_write32(port_membase(p) + OFFSET_THR, v)
Expand Down
2 changes: 2 additions & 0 deletions arch/blackfin/mach-bf609/include/mach/anomaly.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
#define ANOMALY_05000481 (1)
/* IFLUSH sucks at life */
#define ANOMALY_05000491 (1)
/* Tempopary anomaly ID for data loss in MMR read operation if interrupted */
#define ANOMALY_05001001 (__SILICON_REVISION__ < 1)

/* Anomalies that don't exist on this proc */
#define ANOMALY_05000099 (0)
Expand Down

0 comments on commit 913f2f2

Please sign in to comment.