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 Apr 4, 2018
1 parent e44c99a commit 156bd82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
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 @@ -171,6 +171,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 @@ -183,8 +183,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 @@ -193,7 +193,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 @@ -203,6 +202,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 @@ -305,7 +306,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 156bd82

Please sign in to comment.