Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

blackfin: bf60x: anomaly: Add a temporary anomaly 0501001

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 <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>

authored by

Sonic Zhang and committed by
Bob Liu
913f2f2d 8bf7135f

+14
+12
arch/blackfin/include/asm/bfin_serial.h
··· 282 282 #define UART_GET_GCTL(p) UART_GET_CTL(p) 283 283 #define UART_GET_LCR(p) UART_GET_CTL(p) 284 284 #define UART_GET_MCR(p) UART_GET_CTL(p) 285 + #if ANOMALY_05001001 286 + #define UART_GET_STAT(p) \ 287 + ({ \ 288 + u32 __ret; \ 289 + unsigned long flags; \ 290 + flags = hard_local_irq_save(); \ 291 + __ret = bfin_read32(port_membase(p) + OFFSET_STAT); \ 292 + hard_local_irq_restore(flags); \ 293 + __ret; \ 294 + }) 295 + #else 285 296 #define UART_GET_STAT(p) bfin_read32(port_membase(p) + OFFSET_STAT) 297 + #endif 286 298 #define UART_GET_MSR(p) UART_GET_STAT(p) 287 299 288 300 #define UART_PUT_CHAR(p, v) bfin_write32(port_membase(p) + OFFSET_THR, v)
+2
arch/blackfin/mach-bf609/include/mach/anomaly.h
··· 57 57 #define ANOMALY_05000481 (1) 58 58 /* IFLUSH sucks at life */ 59 59 #define ANOMALY_05000491 (1) 60 + /* Tempopary anomaly ID for data loss in MMR read operation if interrupted */ 61 + #define ANOMALY_05001001 (__SILICON_REVISION__ < 1) 60 62 61 63 /* Anomalies that don't exist on this proc */ 62 64 #define ANOMALY_05000099 (0)