aboutsummaryrefslogtreecommitdiff
path: root/include/asm-blackfin/mach-common/cdef_LPBlackfin.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-blackfin/mach-common/cdef_LPBlackfin.h')
-rw-r--r--include/asm-blackfin/mach-common/cdef_LPBlackfin.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/asm-blackfin/mach-common/cdef_LPBlackfin.h b/include/asm-blackfin/mach-common/cdef_LPBlackfin.h
index d39c396f850..58f878947cb 100644
--- a/include/asm-blackfin/mach-common/cdef_LPBlackfin.h
+++ b/include/asm-blackfin/mach-common/cdef_LPBlackfin.h
@@ -39,7 +39,20 @@
#define bfin_read_SRAM_BASE_ADDRESS() bfin_read32(SRAM_BASE_ADDRESS)
#define bfin_write_SRAM_BASE_ADDRESS(val) bfin_write32(SRAM_BASE_ADDRESS,val)
#define bfin_read_DMEM_CONTROL() bfin_read32(DMEM_CONTROL)
+#ifdef ANOMALY_05000125
+static __inline__ void bfin_write_DMEM_CONTROL(unsigned int val)
+{
+ unsigned long flags, iwr;
+
+ local_irq_save(flags);
+ __asm__(".align 8\n");
+ bfin_write32(IMEM_CONTROL, val);
+ __builtin_bfin_ssync();
+ local_irq_restore(flags);
+}
+#else
#define bfin_write_DMEM_CONTROL(val) bfin_write32(DMEM_CONTROL,val)
+#endif
#define bfin_read_DCPLB_STATUS() bfin_read32(DCPLB_STATUS)
#define bfin_write_DCPLB_STATUS(val) bfin_write32(DCPLB_STATUS,val)
#define bfin_read_DCPLB_FAULT_ADDR() bfin_read32(DCPLB_FAULT_ADDR)
@@ -125,7 +138,21 @@
#define DTEST_DATA3 0xFFE0040C
*/
#define bfin_read_IMEM_CONTROL() bfin_read32(IMEM_CONTROL)
+#ifdef ANOMALY_05000125
+static __inline__ void bfin_write_IMEM_CONTROL(unsigned int val)
+{
+ unsigned long flags, iwr;
+
+ local_irq_save(flags);
+ __asm__(".align 8\n");
+ bfin_write32(IMEM_CONTROL, val);
+ __builtin_bfin_ssync();
+ local_irq_restore(flags);
+
+}
+#else
#define bfin_write_IMEM_CONTROL(val) bfin_write32(IMEM_CONTROL,val)
+#endif
#define bfin_read_ICPLB_STATUS() bfin_read32(ICPLB_STATUS)
#define bfin_write_ICPLB_STATUS(val) bfin_write32(ICPLB_STATUS,val)
#define bfin_read_ICPLB_FAULT_ADDR() bfin_read32(ICPLB_FAULT_ADDR)