ieee1394: ohci1394: add reg_flush, remove bogus barriers
PATCH 1/1 ieee1394: ohci1394: add reg_flush, remove bogus barriers
Add a utility function to flush MMIO writes.
Remove some mb()s which didn't do anything.
There are still a few wmb()s in ohci1394 which look suspicious. Shouldn't there be dma_sync_*() calls instead?
Signed-off-by Stefan Richter <[email protected]>
---
drivers/ieee1394/ohci1394.c | 47 +++++++++--------------------------- drivers/ieee1394/ohci1394.h | 14 ++++++---- 2 files changed, 21 insertions(+), 40 deletions(-)
drivers/ieee1394/ohci1394.h +8 -6
@@ -248,17 +248,19 @@ static inline int cross_bound(unsigned lreturn 0 ; } -/* -* Register read and write helper functions. -*/ +/* Register read and write helper functions */ static inline void reg_write (const struct ti_ohci *ohci,int offset,u32 data) { -writel (data, ohci->registers + offset); +writel (data, ohci->registers + offset); } -static inline u32 reg_read (const struct ti_ohci *ohci,int offset) { -return readl (ohci->registers + offset); +return readl (ohci->registers + offset); +} +/* A dummy read to force all PCI writes to be posted immediately */ +static inline void reg_flush (const struct ti_ohci *ohci) +{ +readl (ohci->registers); }
drivers/ieee1394/ohci1394.c +13 -34
120 lines not on this page · raw message
Signature · 3 lines
Stefan Richter -=====-=-=== --== --=-= http://arcgraph.de/sr/
drivers/ieee1394/ohci1394.c static int ohci_iso_recv_start(struct hp · line 1519
Quoted 9 lines · I wrote:
drivers/ieee1394/ohci1394.c +1
-1@@ -1521,7 +1513,7 @@ static int ohci_iso_recv_start(struct hpif (sync !=-1 ) {/* set sync flag on first DMA descriptor */ -struct dma_cmd *cmd = &recv->block[recv->block_dma]; +struct dma_cmd *cmd = &recv->block[recv->block_dma]; cmd->control |=cpu_to_le32 (DMA_CTL_WAIT );/* match sync field */
Ignore this hunk.
Signature · 3 lines
Stefan Richter -=====-=-=== --== --=-= http://arcgraph.de/sr/