Skip to content

Commit

Permalink
TODO: register DMA controllers with instance ID
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-shev committed Sep 4, 2017
1 parent 6e66da7 commit 54f9552
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions drivers/ata/sata_dwc_460ex.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ static int sata_dwc_dma_init_old(struct platform_device *pdev,
return -ENOMEM;

hsdev->dma->dev = &pdev->dev;
hsdev->dma->id = pdev->id;

/* Get SATA DMA interrupt number */
hsdev->dma->irq = irq_of_parse_and_map(np, 1);
Expand Down
1 change: 1 addition & 0 deletions drivers/tty/serial/8250/8250_lpss.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ static void qrk_serial_setup_dma(struct lpss8250 *lpss, struct uart_port *port)
int ret;

chip->dev = &pdev->dev;
chip->id = pdev->devfn;
chip->irq = pci_irq_vector(pdev, 0);
chip->regs = pci_ioremap_bar(pdev, 1);
chip->pdata = &qrk_serial_dma_pdata;
Expand Down
9 changes: 5 additions & 4 deletions sound/soc/intel/common/sst-firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ static int block_list_prepare(struct sst_dsp *dsp,
return ret;
}

static struct dw_dma_chip *dw_probe(struct device *dev, struct resource *mem,
int irq)
static struct dw_dma_chip *dw_probe(struct device *dev, int id,
struct resource *mem, int irq)
{
struct dw_dma_chip *chip;
int err;
Expand All @@ -192,7 +192,6 @@ static struct dw_dma_chip *dw_probe(struct device *dev, struct resource *mem,
if (!chip)
return ERR_PTR(-ENOMEM);

chip->irq = irq;
chip->regs = devm_ioremap_resource(dev, mem);
if (IS_ERR(chip->regs))
return ERR_CAST(chip->regs);
Expand All @@ -202,6 +201,8 @@ static struct dw_dma_chip *dw_probe(struct device *dev, struct resource *mem,
return ERR_PTR(err);

chip->dev = dev;
chip->id = id;
chip->irq = irq;

err = dw_dma_probe(chip);
if (err)
Expand Down Expand Up @@ -306,7 +307,7 @@ int sst_dma_new(struct sst_dsp *sst)
mem.flags = IORESOURCE_MEM;

/* now register DMA engine device */
dma->chip = dw_probe(sst->dma_dev, &mem, sst_pdata->irq);
dma->chip = dw_probe(sst->dma_dev, (int)sst->id, &mem, sst_pdata->irq);
if (IS_ERR(dma->chip)) {
dev_err(sst->dev, "error: DMA device register failed\n");
ret = PTR_ERR(dma->chip);
Expand Down

0 comments on commit 54f9552

Please sign in to comment.