summaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2012-05-15 08:17:35 +0200
committerBob Liu <lliubbo@gmail.com>2012-05-21 08:54:58 +0200
commit913f2f2df797c45e92ab527022cd49deb6eee3ab (patch)
treeecdc3b59ec9aec482792d8e77179702b7c77c23a /arch/blackfin/include
parentblackfin: bf60x: Rename the DDR controller macro (diff)
downloadlinux-913f2f2df797c45e92ab527022cd49deb6eee3ab.tar.xz
linux-913f2f2df797c45e92ab527022cd49deb6eee3ab.zip
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>
Diffstat (limited to 'arch/blackfin/include')
-rw-r--r--arch/blackfin/include/asm/bfin_serial.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/bfin_serial.h b/arch/blackfin/include/asm/bfin_serial.h
index 235c72a1f92d..8597158010b5 100644
--- a/arch/blackfin/include/asm/bfin_serial.h
+++ b/arch/blackfin/include/asm/bfin_serial.h
@@ -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)