diff options
author | Robin Getz <robin.getz@analog.com> | 2007-06-21 11:34:16 +0800 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-06-21 11:34:16 +0800 |
commit | 4bf3f3cbb6add01d3e6a18c73f594b73113b14f2 (patch) | |
tree | a80839f98a64052f4d004a5207da2731fe556908 /include/asm-blackfin/mach-common/cdef_LPBlackfin.h | |
parent | 0864a4e201b1ea442f4c8b887418a29f67e24d30 (diff) |
Blackfin arch: update ANOMALY handling
update lists for 533, 537, and add SSYNC workaround into assembly files.
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'include/asm-blackfin/mach-common/cdef_LPBlackfin.h')
-rw-r--r-- | include/asm-blackfin/mach-common/cdef_LPBlackfin.h | 27 |
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) |