aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sh/include/asm/pci.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/arch/sh/include/asm/pci.h b/arch/sh/include/asm/pci.h
index 5b2e0fcdfc22..ae0da6f48b6d 100644
--- a/arch/sh/include/asm/pci.h
+++ b/arch/sh/include/asm/pci.h
@@ -89,12 +89,28 @@ static inline void pcibios_penalize_isa_irq(int irq, int active)
89#endif 89#endif
90 90
91#ifdef CONFIG_PCI 91#ifdef CONFIG_PCI
92/*
93 * None of the SH PCI controllers support MWI, it is always treated as a
94 * direct memory write.
95 */
96#define PCI_DISABLE_MWI
97
92static inline void pci_dma_burst_advice(struct pci_dev *pdev, 98static inline void pci_dma_burst_advice(struct pci_dev *pdev,
93 enum pci_dma_burst_strategy *strat, 99 enum pci_dma_burst_strategy *strat,
94 unsigned long *strategy_parameter) 100 unsigned long *strategy_parameter)
95{ 101{
96 *strat = PCI_DMA_BURST_INFINITY; 102 unsigned long cacheline_size;
97 *strategy_parameter = ~0UL; 103 u8 byte;
104
105 pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &byte);
106
107 if (byte == 0)
108 cacheline_size = L1_CACHE_BYTES;
109 else
110 cacheline_size = byte << 2;
111
112 *strat = PCI_DMA_BURST_MULTIPLE;
113 *strategy_parameter = cacheline_size;
98} 114}
99#endif 115#endif
100 116