diff mbox series

[v1,07/12] dmaengine: dw: platform: Enable iDMA 32-bit on Intel Elkhart Lake

Message ID 20190806094054.64871-7-andriy.shevchenko@linux.intel.com (mailing list archive)
State Changes Requested
Headers show
Series [v1,01/12] dmaengine: acpi: Set up DMA mask based on CSRT | expand

Commit Message

Andy Shevchenko Aug. 6, 2019, 9:40 a.m. UTC
Intel Elkhart Lake OSE (Offload Service Engine) provides few DMA controllers
to the host. Enable them in the ACPI glue driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/dma/dw/platform.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

Comments

Andy Shevchenko Aug. 14, 2019, 2:44 p.m. UTC | #1
On Tue, Aug 06, 2019 at 12:40:49PM +0300, Andy Shevchenko wrote:
> Intel Elkhart Lake OSE (Offload Service Engine) provides few DMA controllers
> to the host. Enable them in the ACPI glue driver.
> 

Since Jarkko noticed an issue with naming of IP, this and relevant patches has
to be re-done.

> +	/* Elkhart Lake iDMA 32-bit (OSE DMA) */
> +	{ "80864BB4", (kernel_ulong_t)&idma32_chip_pdata },
> +	{ "80864BB5", (kernel_ulong_t)&idma32_chip_pdata },
> +	{ "80864BB6", (kernel_ulong_t)&idma32_chip_pdata },
Vinod Koul Aug. 20, 2019, 11:13 a.m. UTC | #2
On 14-08-19, 17:44, Andy Shevchenko wrote:
> On Tue, Aug 06, 2019 at 12:40:49PM +0300, Andy Shevchenko wrote:
> > Intel Elkhart Lake OSE (Offload Service Engine) provides few DMA controllers
> > to the host. Enable them in the ACPI glue driver.
> > 
> 
> Since Jarkko noticed an issue with naming of IP, this and relevant patches has
> to be re-done.

OK I will wait for  av2 then :-)
diff mbox series

Patch

diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c
index 234abbd6359a..7e0ec6ef3a1f 100644
--- a/drivers/dma/dw/platform.c
+++ b/drivers/dma/dw/platform.c
@@ -173,7 +173,6 @@  static int dw_probe(struct platform_device *pdev)
 	struct dw_dma_chip *chip;
 	struct device *dev = &pdev->dev;
 	struct resource *mem;
-	const struct dw_dma_platform_data *pdata;
 	int err;
 
 	match = device_get_match_data(dev);
@@ -201,13 +200,14 @@  static int dw_probe(struct platform_device *pdev)
 	if (err)
 		return err;
 
-	pdata = dev_get_platdata(dev);
-	if (!pdata)
-		pdata = dw_dma_parse_dt(pdev);
+	if (!data->pdata)
+		data->pdata = dev_get_platdata(dev);
+	if (!data->pdata)
+		data->pdata = dw_dma_parse_dt(pdev);
 
 	chip->dev = dev;
 	chip->id = pdev->id;
-	chip->pdata = pdata;
+	chip->pdata = data->pdata;
 
 	data->chip = chip;
 
@@ -298,6 +298,12 @@  static const struct acpi_device_id dw_dma_acpi_id_table[] = {
 	{ "INTL9C60", (kernel_ulong_t)&dw_dma_chip_pdata },
 	{ "80862286", (kernel_ulong_t)&dw_dma_chip_pdata },
 	{ "808622C0", (kernel_ulong_t)&dw_dma_chip_pdata },
+
+	/* Elkhart Lake iDMA 32-bit (OSE DMA) */
+	{ "80864BB4", (kernel_ulong_t)&idma32_chip_pdata },
+	{ "80864BB5", (kernel_ulong_t)&idma32_chip_pdata },
+	{ "80864BB6", (kernel_ulong_t)&idma32_chip_pdata },
+
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, dw_dma_acpi_id_table);