[RFC] pl08x: don't use dma_slave_config direction argument
Russell King - ARM Linux
linux at arm.linux.org.uk
Wed May 16 09:17:20 EDT 2012
On Wed, May 16, 2012 at 03:04:39PM +0200, Roland Stigge wrote:
> On 05/16/2012 02:52 PM, Russell King - ARM Linux wrote:
> >> * SLC driver says:
> >>
> >> lpc32xx-nand 20020000.flash: FIFO not empty!
> >> lpc32xx-nand 20020000.flash: FIFO held data too long
> >> lpc32xx-nand 20020000.flash: DMA FIFO failure
> >>
> >> Any hints, before I find the time to sort out all the details with
> >> amba-pl08x?
> >
> > Nothing jumps out; it would be useful if you could bisect the small
> > series - I did the conversion in small steps so it should be easy to
> > track down. And it shouldn't take too long to rebuild between each
> > iteration. Whatever it is, it's probably going to be a stupid mistake
> > somewhere.
>
> The problem first appears with patch #4.
I said it would be something silly...
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index 940f762..e62dd87 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -1415,7 +1415,7 @@ static struct dma_async_tx_descriptor *pl08x_prep_slave_sg(
return NULL;
}
- cctl |= pl08x_select_bus(src_buses, dst_buses);
+ txd->cctl = cctl | pl08x_select_bus(src_buses, dst_buses);
if (plchan->cfg.device_fc)
tmp = (direction == DMA_MEM_TO_DEV) ? PL080_FLOW_MEM2PER_PER :
@@ -1424,7 +1424,7 @@ static struct dma_async_tx_descriptor *pl08x_prep_slave_sg(
tmp = (direction == DMA_MEM_TO_DEV) ? PL080_FLOW_MEM2PER :
PL080_FLOW_PER2MEM;
- txd->ccfg = cctl | (tmp << PL080_CONFIG_FLOW_CONTROL_SHIFT);
+ txd->ccfg |= tmp << PL080_CONFIG_FLOW_CONTROL_SHIFT;
for_each_sg(sgl, sg, sg_len, tmp) {
dsg = kzalloc(sizeof(struct pl08x_sg), GFP_NOWAIT);
More information about the linux-arm-kernel
mailing list