Lines Matching +full:burst +full:- +full:clk +full:- +full:enable
1 // SPDX-License-Identifier: GPL-2.0-only
10 #include <linux/dma-mapping.h>
13 #include <linux/clk.h>
38 #define DMA_PDEN BIT(6) /* enable packet drop */
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 */
66 ltq_dma_w32(ch->nr, LTQ_DMA_CS); in ltq_dma_enable_irq()
67 ltq_dma_w32_mask(0, 1 << ch->nr, LTQ_DMA_IRNEN); in ltq_dma_enable_irq()
78 ltq_dma_w32(ch->nr, LTQ_DMA_CS); in ltq_dma_disable_irq()
79 ltq_dma_w32_mask(1 << ch->nr, 0, LTQ_DMA_IRNEN); in ltq_dma_disable_irq()
90 ltq_dma_w32(ch->nr, LTQ_DMA_CS); in ltq_dma_ack_irq()
102 ltq_dma_w32(ch->nr, LTQ_DMA_CS); in ltq_dma_open()
114 ltq_dma_w32(ch->nr, LTQ_DMA_CS); in ltq_dma_close()
116 ltq_dma_w32_mask(1 << ch->nr, 0, LTQ_DMA_IRNEN); in ltq_dma_close()
126 ch->desc = 0; in ltq_dma_alloc()
127 ch->desc_base = dma_alloc_coherent(ch->dev, in ltq_dma_alloc()
129 &ch->phys, GFP_ATOMIC); in ltq_dma_alloc()
132 ltq_dma_w32(ch->nr, LTQ_DMA_CS); in ltq_dma_alloc()
133 ltq_dma_w32(ch->phys, LTQ_DMA_CDBA); in ltq_dma_alloc()
152 ltq_dma_w32_mask(0, 1 << ch->nr, LTQ_DMA_IRNEN); in ltq_dma_alloc_tx()
167 ltq_dma_w32_mask(0, 1 << ch->nr, LTQ_DMA_IRNEN); in ltq_dma_alloc_rx()
176 if (!ch->desc_base) in ltq_dma_free()
179 dma_free_coherent(ch->dev, LTQ_DESC_NUM * LTQ_DESC_SIZE, in ltq_dma_free()
180 ch->desc_base, ch->phys); in ltq_dma_free()
241 struct clk *clk; in ltq_dma_init() local
250 clk = clk_get(&pdev->dev, NULL); in ltq_dma_init()
251 if (IS_ERR(clk)) in ltq_dma_init()
254 clk_enable(clk); in ltq_dma_init()
272 dev_info(&pdev->dev, in ltq_dma_init()
273 "Init done - hw rev: %X, ports: %d, channels: %d\n", in ltq_dma_init()
280 { .compatible = "lantiq,dma-xway" },
287 .name = "dma-xway",