]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
blackfin: bf60x: anomaly: Add a temporary anomaly 0501001
authorSonic Zhang <sonic.zhang@analog.com>
Tue, 15 May 2012 06:17:35 +0000 (14:17 +0800)
committerBob Liu <lliubbo@gmail.com>
Mon, 21 May 2012 06:54:58 +0000 (14:54 +0800)
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>
arch/blackfin/include/asm/bfin_serial.h
arch/blackfin/mach-bf609/include/mach/anomaly.h

index 235c72a1f92d417e90962e6a7611bc22c9626977..8597158010b53c69b1c707b8faccbba1065c1de1 100644 (file)
@@ -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)
index 97a9c65bbe32c4abcd303ea0e90ada6598f81cc5..bdd39aefb5655d6f7d545b0bd50f9d81272cbbcd 100644 (file)
@@ -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)