mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 14:12:06 +00:00
dmaengine fixes for v6.3
- apple admac driver fixes for current_tx, src_addr_widths and global' interrupt flags handling - xdma kerneldoc fix - core fix for use of devm_add_action_or_reset -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmQ24cwACgkQfBQHDyUj g0d/BBAAogctaal5eawTXUetsRx2PSOfgtTnG09Q+HMG3FIkoRplITngipHNG4eG 1ynM750+RsupMsEY8oxWGZIZ8r3ex12hgaQgwEbCF7eB0RxqQzCyjeubwIihlD7S QpjOdqliuf0R7WJvBAv33emnmY2kQQaJYUrR/nmFNOSQ5bnYL9nrd2Wdwv69JmjA Sdy1lWvqVVZJ5OUFrT/B/uDgVMxI9UN97nD3X5+s3HgP4A7SoLBgGM0k2xQYnF6i k+Ru+xauvoRVcW+2KW6JlSwhLhS543CFg/SRxTEbSk/joU8Kn63Kkbh55CeJJa6h vGL3IW30I4/1+Wr7E4rk0UoNflHPO3Wti6KS6y7P98d8rImvT88/wnjHL4rMDpom 1cDMYZU4VsddvVSHkb7jL7B4+tWTkucZYFWke2r+d0Fc4jWYMJ4+vSwBk7jp3pGl aBhl/dnUq6vIo8hHemiRg3l0Wlal/tXe4FiMgik0ELjT7sjlKSlr/q66Zb7r03o4 Lwk8CRRqjZ03eROFbEKPFseJUkXGnLnGFRpLKcM6PAjYmP6KaEJyiwO5d5Dii8t2 jUlVRXeqE8u7Udsh1XAxCy6+WrWhDox/CujBUUWq2xCuc8rrMufI7Y0GNrZx+NRH oBZudqEe3q00CDAqKVmxnaRe9omLi5Ji3BmQkfcy9FYuZi/NTe4= =3UUN -----END PGP SIGNATURE----- Merge tag 'dmaengine-fix-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine fixes from Vinod Koul: "A couple of fixes in apple driver, core and kernedoc fix for dmaengine subsystem: - apple admac driver fixes for current_tx, src_addr_widths and global' interrupt flags handling - xdma kerneldoc fix - core fix for use of devm_add_action_or_reset" * tag 'dmaengine-fix-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: dmaengine: apple-admac: Fix 'current_tx' not getting freed dmaengine: apple-admac: Set src_addr_widths capability dmaengine: apple-admac: Handle 'global' interrupt flags dmaengine: xilinx: xdma: Fix some kernel-doc comments dmaengine: Actually use devm_add_action_or_reset()
This commit is contained in:
commit
b05e0f5e74
@ -75,6 +75,7 @@
|
|||||||
|
|
||||||
#define REG_TX_INTSTATE(idx) (0x0030 + (idx) * 4)
|
#define REG_TX_INTSTATE(idx) (0x0030 + (idx) * 4)
|
||||||
#define REG_RX_INTSTATE(idx) (0x0040 + (idx) * 4)
|
#define REG_RX_INTSTATE(idx) (0x0040 + (idx) * 4)
|
||||||
|
#define REG_GLOBAL_INTSTATE(idx) (0x0050 + (idx) * 4)
|
||||||
#define REG_CHAN_INTSTATUS(ch, idx) (0x8010 + (ch) * 0x200 + (idx) * 4)
|
#define REG_CHAN_INTSTATUS(ch, idx) (0x8010 + (ch) * 0x200 + (idx) * 4)
|
||||||
#define REG_CHAN_INTMASK(ch, idx) (0x8020 + (ch) * 0x200 + (idx) * 4)
|
#define REG_CHAN_INTMASK(ch, idx) (0x8020 + (ch) * 0x200 + (idx) * 4)
|
||||||
|
|
||||||
@ -511,7 +512,10 @@ static int admac_terminate_all(struct dma_chan *chan)
|
|||||||
admac_stop_chan(adchan);
|
admac_stop_chan(adchan);
|
||||||
admac_reset_rings(adchan);
|
admac_reset_rings(adchan);
|
||||||
|
|
||||||
|
if (adchan->current_tx) {
|
||||||
|
list_add_tail(&adchan->current_tx->node, &adchan->to_free);
|
||||||
adchan->current_tx = NULL;
|
adchan->current_tx = NULL;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Descriptors can only be freed after the tasklet
|
* Descriptors can only be freed after the tasklet
|
||||||
* has been killed (in admac_synchronize).
|
* has been killed (in admac_synchronize).
|
||||||
@ -672,13 +676,14 @@ static void admac_handle_chan_int(struct admac_data *ad, int no)
|
|||||||
static irqreturn_t admac_interrupt(int irq, void *devid)
|
static irqreturn_t admac_interrupt(int irq, void *devid)
|
||||||
{
|
{
|
||||||
struct admac_data *ad = devid;
|
struct admac_data *ad = devid;
|
||||||
u32 rx_intstate, tx_intstate;
|
u32 rx_intstate, tx_intstate, global_intstate;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
rx_intstate = readl_relaxed(ad->base + REG_RX_INTSTATE(ad->irq_index));
|
rx_intstate = readl_relaxed(ad->base + REG_RX_INTSTATE(ad->irq_index));
|
||||||
tx_intstate = readl_relaxed(ad->base + REG_TX_INTSTATE(ad->irq_index));
|
tx_intstate = readl_relaxed(ad->base + REG_TX_INTSTATE(ad->irq_index));
|
||||||
|
global_intstate = readl_relaxed(ad->base + REG_GLOBAL_INTSTATE(ad->irq_index));
|
||||||
|
|
||||||
if (!tx_intstate && !rx_intstate)
|
if (!tx_intstate && !rx_intstate && !global_intstate)
|
||||||
return IRQ_NONE;
|
return IRQ_NONE;
|
||||||
|
|
||||||
for (i = 0; i < ad->nchannels; i += 2) {
|
for (i = 0; i < ad->nchannels; i += 2) {
|
||||||
@ -693,6 +698,12 @@ static irqreturn_t admac_interrupt(int irq, void *devid)
|
|||||||
rx_intstate >>= 1;
|
rx_intstate >>= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (global_intstate) {
|
||||||
|
dev_warn(ad->dev, "clearing unknown global interrupt flag: %x\n",
|
||||||
|
global_intstate);
|
||||||
|
writel_relaxed(~(u32) 0, ad->base + REG_GLOBAL_INTSTATE(ad->irq_index));
|
||||||
|
}
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -850,6 +861,9 @@ static int admac_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
dma->directions = BIT(DMA_MEM_TO_DEV) | BIT(DMA_DEV_TO_MEM);
|
dma->directions = BIT(DMA_MEM_TO_DEV) | BIT(DMA_DEV_TO_MEM);
|
||||||
dma->residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
|
dma->residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
|
||||||
|
dma->src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) |
|
||||||
|
BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) |
|
||||||
|
BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
|
||||||
dma->dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) |
|
dma->dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) |
|
||||||
BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) |
|
BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) |
|
||||||
BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
|
BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
|
||||||
|
@ -1342,7 +1342,7 @@ int dmaenginem_async_device_register(struct dma_device *device)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
return devm_add_action(device->dev, dmaenginem_async_device_unregister, device);
|
return devm_add_action_or_reset(device->dev, dmaenginem_async_device_unregister, device);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(dmaenginem_async_device_register);
|
EXPORT_SYMBOL(dmaenginem_async_device_register);
|
||||||
|
|
||||||
|
@ -277,7 +277,7 @@ failed:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* xdma_xfer_start - Start DMA transfer
|
* xdma_xfer_start - Start DMA transfer
|
||||||
* @xdma_chan: DMA channel pointer
|
* @xchan: DMA channel pointer
|
||||||
*/
|
*/
|
||||||
static int xdma_xfer_start(struct xdma_chan *xchan)
|
static int xdma_xfer_start(struct xdma_chan *xchan)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user