Skip to content

Commit e6e4b75

Browse files
abajkgregkh
authored andcommitted
MIPS: lantiq: dma: fix burst length for DEU
[ Upstream commit 5ad74d3 ] The current definition of 2W burst length is invalid. This patch fixes it. Current downstream DEU driver doesn't use DMA. An incorrect burst length value doesn't cause any errors. This patch also adds other burst length values. Fixes: dfec1a8 ("MIPS: Lantiq: Add DMA support") Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 4a9334d commit e6e4b75

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

  • arch/mips/lantiq/xway

‎arch/mips/lantiq/xway/dma.c‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@
4141
#define DMA_IRQ_ACK 0x7e /* IRQ status register */
4242
#define DMA_POLL BIT(31) /* turn on channel polling */
4343
#define DMA_CLK_DIV4 BIT(6) /* polling clock divider */
44-
#define DMA_2W_BURST BIT(1) /* 2 word burst length */
44+
#define DMA_PCTRL_2W_BURST 0x1 /* 2 word burst length */
45+
#define DMA_PCTRL_4W_BURST 0x2 /* 4 word burst length */
46+
#define DMA_PCTRL_8W_BURST 0x3 /* 8 word burst length */
47+
#define DMA_TX_BURST_SHIFT 4 /* tx burst shift */
48+
#define DMA_RX_BURST_SHIFT 2 /* rx burst shift */
4549
#define DMA_ETOP_ENDIANNESS (0xf << 8) /* endianness swap etop channels */
4650
#define DMA_WEIGHT (BIT(17) | BIT(16)) /* default channel wheight */
4751

@@ -192,7 +196,8 @@ ltq_dma_init_port(int p)
192196
break;
193197

194198
case DMA_PORT_DEU:
195-
ltq_dma_w32((DMA_2W_BURST << 4) | (DMA_2W_BURST << 2),
199+
ltq_dma_w32((DMA_PCTRL_2W_BURST << DMA_TX_BURST_SHIFT) |
200+
(DMA_PCTRL_2W_BURST << DMA_RX_BURST_SHIFT),
196201
LTQ_DMA_PCTRL);
197202
break;
198203

0 commit comments

Comments
 (0)