mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 18:53:52 +08:00
Merge branch 'topic/renesas' into for-linus
This commit is contained in:
commit
d39dae11c7
@ -28,6 +28,7 @@ Required Properties:
|
|||||||
- "renesas,dmac-r8a7796" (R-Car M3-W)
|
- "renesas,dmac-r8a7796" (R-Car M3-W)
|
||||||
- "renesas,dmac-r8a77970" (R-Car V3M)
|
- "renesas,dmac-r8a77970" (R-Car V3M)
|
||||||
- "renesas,dmac-r8a77980" (R-Car V3H)
|
- "renesas,dmac-r8a77980" (R-Car V3H)
|
||||||
|
- "renesas,dmac-r8a77995" (R-Car D3)
|
||||||
|
|
||||||
- reg: base address and length of the registers block for the DMAC
|
- reg: base address and length of the registers block for the DMAC
|
||||||
|
|
||||||
|
@ -12,6 +12,8 @@ Required Properties:
|
|||||||
- "renesas,r8a7795-usb-dmac" (R-Car H3)
|
- "renesas,r8a7795-usb-dmac" (R-Car H3)
|
||||||
- "renesas,r8a7796-usb-dmac" (R-Car M3-W)
|
- "renesas,r8a7796-usb-dmac" (R-Car M3-W)
|
||||||
- "renesas,r8a77965-usb-dmac" (R-Car M3-N)
|
- "renesas,r8a77965-usb-dmac" (R-Car M3-N)
|
||||||
|
- "renesas,r8a77990-usb-dmac" (R-Car E3)
|
||||||
|
- "renesas,r8a77995-usb-dmac" (R-Car D3)
|
||||||
- reg: base address and length of the registers block for the DMAC
|
- reg: base address and length of the registers block for the DMAC
|
||||||
- interrupts: interrupt specifiers for the DMAC, one for each entry in
|
- interrupts: interrupt specifiers for the DMAC, one for each entry in
|
||||||
interrupt-names.
|
interrupt-names.
|
||||||
|
@ -443,7 +443,6 @@ static bool sh_dmae_reset(struct sh_dmae_device *shdev)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARCH_SHMOBILE)
|
|
||||||
static irqreturn_t sh_dmae_err(int irq, void *data)
|
static irqreturn_t sh_dmae_err(int irq, void *data)
|
||||||
{
|
{
|
||||||
struct sh_dmae_device *shdev = data;
|
struct sh_dmae_device *shdev = data;
|
||||||
@ -454,7 +453,6 @@ static irqreturn_t sh_dmae_err(int irq, void *data)
|
|||||||
sh_dmae_reset(shdev);
|
sh_dmae_reset(shdev);
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static bool sh_dmae_desc_completed(struct shdma_chan *schan,
|
static bool sh_dmae_desc_completed(struct shdma_chan *schan,
|
||||||
struct shdma_desc *sdesc)
|
struct shdma_desc *sdesc)
|
||||||
@ -686,11 +684,8 @@ static int sh_dmae_probe(struct platform_device *pdev)
|
|||||||
const struct sh_dmae_pdata *pdata;
|
const struct sh_dmae_pdata *pdata;
|
||||||
unsigned long chan_flag[SH_DMAE_MAX_CHANNELS] = {};
|
unsigned long chan_flag[SH_DMAE_MAX_CHANNELS] = {};
|
||||||
int chan_irq[SH_DMAE_MAX_CHANNELS];
|
int chan_irq[SH_DMAE_MAX_CHANNELS];
|
||||||
#if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARCH_SHMOBILE)
|
|
||||||
unsigned long irqflags = 0;
|
unsigned long irqflags = 0;
|
||||||
int errirq;
|
int err, errirq, i, irq_cnt = 0, irqres = 0, irq_cap = 0;
|
||||||
#endif
|
|
||||||
int err, i, irq_cnt = 0, irqres = 0, irq_cap = 0;
|
|
||||||
struct sh_dmae_device *shdev;
|
struct sh_dmae_device *shdev;
|
||||||
struct dma_device *dma_dev;
|
struct dma_device *dma_dev;
|
||||||
struct resource *chan, *dmars, *errirq_res, *chanirq_res;
|
struct resource *chan, *dmars, *errirq_res, *chanirq_res;
|
||||||
@ -792,33 +787,32 @@ static int sh_dmae_probe(struct platform_device *pdev)
|
|||||||
if (err)
|
if (err)
|
||||||
goto rst_err;
|
goto rst_err;
|
||||||
|
|
||||||
#if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARCH_SHMOBILE)
|
if (IS_ENABLED(CONFIG_CPU_SH4) || IS_ENABLED(CONFIG_ARCH_RENESAS)) {
|
||||||
chanirq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 1);
|
chanirq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 1);
|
||||||
|
|
||||||
if (!chanirq_res)
|
if (!chanirq_res)
|
||||||
|
chanirq_res = errirq_res;
|
||||||
|
else
|
||||||
|
irqres++;
|
||||||
|
|
||||||
|
if (chanirq_res == errirq_res ||
|
||||||
|
(errirq_res->flags & IORESOURCE_BITS) == IORESOURCE_IRQ_SHAREABLE)
|
||||||
|
irqflags = IRQF_SHARED;
|
||||||
|
|
||||||
|
errirq = errirq_res->start;
|
||||||
|
|
||||||
|
err = devm_request_irq(&pdev->dev, errirq, sh_dmae_err,
|
||||||
|
irqflags, "DMAC Address Error", shdev);
|
||||||
|
if (err) {
|
||||||
|
dev_err(&pdev->dev,
|
||||||
|
"DMA failed requesting irq #%d, error %d\n",
|
||||||
|
errirq, err);
|
||||||
|
goto eirq_err;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
chanirq_res = errirq_res;
|
chanirq_res = errirq_res;
|
||||||
else
|
|
||||||
irqres++;
|
|
||||||
|
|
||||||
if (chanirq_res == errirq_res ||
|
|
||||||
(errirq_res->flags & IORESOURCE_BITS) == IORESOURCE_IRQ_SHAREABLE)
|
|
||||||
irqflags = IRQF_SHARED;
|
|
||||||
|
|
||||||
errirq = errirq_res->start;
|
|
||||||
|
|
||||||
err = devm_request_irq(&pdev->dev, errirq, sh_dmae_err, irqflags,
|
|
||||||
"DMAC Address Error", shdev);
|
|
||||||
if (err) {
|
|
||||||
dev_err(&pdev->dev,
|
|
||||||
"DMA failed requesting irq #%d, error %d\n",
|
|
||||||
errirq, err);
|
|
||||||
goto eirq_err;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
chanirq_res = errirq_res;
|
|
||||||
#endif /* CONFIG_CPU_SH4 || CONFIG_ARCH_SHMOBILE */
|
|
||||||
|
|
||||||
if (chanirq_res->start == chanirq_res->end &&
|
if (chanirq_res->start == chanirq_res->end &&
|
||||||
!platform_get_resource(pdev, IORESOURCE_IRQ, 1)) {
|
!platform_get_resource(pdev, IORESOURCE_IRQ, 1)) {
|
||||||
/* Special case - all multiplexed */
|
/* Special case - all multiplexed */
|
||||||
@ -884,9 +878,7 @@ edmadevreg:
|
|||||||
chan_probe_err:
|
chan_probe_err:
|
||||||
sh_dmae_chan_remove(shdev);
|
sh_dmae_chan_remove(shdev);
|
||||||
|
|
||||||
#if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARCH_SHMOBILE)
|
|
||||||
eirq_err:
|
eirq_err:
|
||||||
#endif
|
|
||||||
rst_err:
|
rst_err:
|
||||||
spin_lock_irq(&sh_dmae_lock);
|
spin_lock_irq(&sh_dmae_lock);
|
||||||
list_del_rcu(&shdev->node);
|
list_del_rcu(&shdev->node);
|
||||||
|
Loading…
Reference in New Issue
Block a user