Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: xilinx_dma: Extend dma_config struct to store irq routine handle

Extend dma_config structure to store irq routine handle. It enables runtime
handler selection based on xdma_ip_type and serves as preparatory patch for
adding MCDMA IP support.

Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Suggested-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/1571763622-29281-6-git-send-email-radhey.shyam.pandey@xilinx.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Radhey Shyam Pandey and committed by
Vinod Koul
c2f6b67d bcb2dc7b

+6 -2
+6 -2
drivers/dma/xilinx/xilinx_dma.c
··· 391 391 int (*clk_init)(struct platform_device *pdev, struct clk **axi_clk, 392 392 struct clk **tx_clk, struct clk **txs_clk, 393 393 struct clk **rx_clk, struct clk **rxs_clk); 394 + irqreturn_t (*irq_handler)(int irq, void *data); 394 395 }; 395 396 396 397 /** ··· 2403 2402 2404 2403 /* Request the interrupt */ 2405 2404 chan->irq = irq_of_parse_and_map(node, 0); 2406 - err = request_irq(chan->irq, xilinx_dma_irq_handler, IRQF_SHARED, 2407 - "xilinx-dma-controller", chan); 2405 + err = request_irq(chan->irq, xdev->dma_config->irq_handler, 2406 + IRQF_SHARED, "xilinx-dma-controller", chan); 2408 2407 if (err) { 2409 2408 dev_err(xdev->dev, "unable to request IRQ %d\n", chan->irq); 2410 2409 return err; ··· 2498 2497 static const struct xilinx_dma_config axidma_config = { 2499 2498 .dmatype = XDMA_TYPE_AXIDMA, 2500 2499 .clk_init = axidma_clk_init, 2500 + .irq_handler = xilinx_dma_irq_handler, 2501 2501 }; 2502 2502 2503 2503 static const struct xilinx_dma_config axicdma_config = { 2504 2504 .dmatype = XDMA_TYPE_CDMA, 2505 2505 .clk_init = axicdma_clk_init, 2506 + .irq_handler = xilinx_dma_irq_handler, 2506 2507 }; 2507 2508 2508 2509 static const struct xilinx_dma_config axivdma_config = { 2509 2510 .dmatype = XDMA_TYPE_VDMA, 2510 2511 .clk_init = axivdma_clk_init, 2512 + .irq_handler = xilinx_dma_irq_handler, 2511 2513 }; 2512 2514 2513 2515 static const struct of_device_id xilinx_dma_of_ids[] = {