diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2008-12-21 02:54:28 -0700 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2008-12-21 02:54:28 -0700 |
commit | aaab5e83c2c25d94f7409bdc947a5cc383514e15 (patch) | |
tree | 929571b5bf2728ac8494b56d0c4965b2aaa47da8 /arch/powerpc/sysdev/bestcomm/bestcomm_priv.h | |
parent | e4efe3c271c5498ffe7e167eaff01514be2b9a77 (diff) | |
download | op-kernel-dev-aaab5e83c2c25d94f7409bdc947a5cc383514e15.zip op-kernel-dev-aaab5e83c2c25d94f7409bdc947a5cc383514e15.tar.gz |
powerpc/mpc5200: Disable bestcomm prefetching when ATA DMA enabled
When ATA DMA is enabled, bestcomm prefetching does not work. This
patch adds a function to disable bestcomm prefetch when the ATA
Bestcomm task is initialized.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/powerpc/sysdev/bestcomm/bestcomm_priv.h')
-rw-r--r-- | arch/powerpc/sysdev/bestcomm/bestcomm_priv.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm_priv.h b/arch/powerpc/sysdev/bestcomm/bestcomm_priv.h index 746f155..eb0d1c8 100644 --- a/arch/powerpc/sysdev/bestcomm/bestcomm_priv.h +++ b/arch/powerpc/sysdev/bestcomm/bestcomm_priv.h @@ -241,6 +241,22 @@ extern void bcom_set_initiator(int task, int initiator); #define TASK_ENABLE 0x8000 +/** + * bcom_disable_prefetch - Hook to disable bus prefetching + * + * ATA DMA and the original MPC5200 need this due to silicon bugs. At the + * moment disabling prefetch is a one-way street. There is no mechanism + * in place to turn prefetch back on after it has been disabled. There is + * no reason it couldn't be done, it would just be more complex to implement. + */ +static inline void bcom_disable_prefetch(void) +{ + u16 regval; + + regval = in_be16(&bcom_eng->regs->PtdCntrl); + out_be16(&bcom_eng->regs->PtdCntrl, regval | 1); +}; + static inline void bcom_enable_task(int task) { |