Skip to content

Commit

Permalink
bcm2708-dmaengine: Use platform_get_irq
Browse files Browse the repository at this point in the history
The platform driver framework no longer creates IRQ resources for
platform devices because they are expected to use platform_get_irq.
This causes the bcm2808_fb acceleration to fail.

Fix the problem by calling platform_get_irq as intended.

See: #5131

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
  • Loading branch information
pelwell authored and popcornmix committed Oct 12, 2022
1 parent 5977fc4 commit 6bd404f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/dma/bcm2708-dmaengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ extern int bcm_dma_chan_alloc(unsigned required_feature_set,
{
struct vc_dmaman *dmaman = g_dmaman;
struct platform_device *pdev = to_platform_device(dmaman_dev);
struct resource *r;
int chan;
int irq;

if (!dmaman_dev)
return -ENODEV;
Expand All @@ -210,8 +210,8 @@ extern int bcm_dma_chan_alloc(unsigned required_feature_set,
if (chan < 0)
goto out;

r = platform_get_resource(pdev, IORESOURCE_IRQ, (unsigned int)chan);
if (!r) {
irq = platform_get_irq(pdev, (unsigned int)chan);
if (irq < 0) {
dev_err(dmaman_dev, "failed to get irq for DMA channel %d\n",
chan);
vc_dmaman_chan_free(dmaman, chan);
Expand All @@ -220,7 +220,7 @@ extern int bcm_dma_chan_alloc(unsigned required_feature_set,
}

*out_dma_base = BCM2708_DMA_CHANIO(dmaman->dma_base, chan);
*out_dma_irq = r->start;
*out_dma_irq = irq;
dev_dbg(dmaman_dev,
"Legacy API allocated channel=%d, base=%p, irq=%i\n",
chan, *out_dma_base, *out_dma_irq);
Expand Down

0 comments on commit 6bd404f

Please sign in to comment.