diff options
| author | Albert Aribaud <albert.aribaud@free.fr> | 2010-07-10 15:41:29 +0200 | 
|---|---|---|
| committer | Ben Warren <biggerbadderben@gmail.com> | 2010-07-12 00:02:12 -0700 | 
| commit | c19a20d5bd3c2196fb1562a329191e2347d5a40a (patch) | |
| tree | 175b2685e8dde444a6e13dc74d3399906d8394f4 | |
| parent | ca08054e80c64402f6a767a6a188dcfc096eb3b9 (diff) | |
| download | olio-uboot-2014.01-c19a20d5bd3c2196fb1562a329191e2347d5a40a.tar.xz olio-uboot-2014.01-c19a20d5bd3c2196fb1562a329191e2347d5a40a.zip | |
kirkwood_egiga: bugfix: add DMA sequence points
Insert isb() sequence points to ensure DMA descriptors
are filled in and set up before actual DMA occurs.
Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
| -rw-r--r-- | drivers/net/kirkwood_egiga.c | 9 | 
1 files changed, 8 insertions, 1 deletions
| diff --git a/drivers/net/kirkwood_egiga.c b/drivers/net/kirkwood_egiga.c index 932792e36..ea0c5223b 100644 --- a/drivers/net/kirkwood_egiga.c +++ b/drivers/net/kirkwood_egiga.c @@ -447,6 +447,8 @@ static int kwgbe_init(struct eth_device *dev)  	/* Assignment of Rx CRDB of given RXUQ */  	KWGBEREG_WR(regs->rxcdp[RXUQ], (u32) dkwgbe->p_rxdesc_curr); +	/* ensure previous write is done before enabling Rx DMA */ +	isb();  	/* Enable port Rx. */  	KWGBEREG_WR(regs->rqc, (1 << RXUQ)); @@ -536,8 +538,13 @@ static int kwgbe_send(struct eth_device *dev, volatile void *dataptr,  	p_txdesc->buf_ptr = (u8 *) p;  	p_txdesc->byte_cnt = datasize; -	/* Apply send command using zeroth TXUQ */ +	/* Set this tc desc as zeroth TXUQ */  	KWGBEREG_WR(regs->tcqdp[TXUQ], (u32) p_txdesc); + +	/* ensure tx desc writes above are performed before we start Tx DMA */ +	isb(); + +	/* Apply send command using zeroth TXUQ */  	KWGBEREG_WR(regs->tqc, (1 << TXUQ));  	/* |