diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2015-10-13 13:09:18 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-10-30 22:02:36 -0400 |
commit | 175267b389f781748e2bbb6c737e76b5c9bc4c88 (patch) | |
tree | a382c37e2bdb31761a0b0c3a4e3fdd528c1b2ef9 | |
parent | 30cb2639aa5253cf5bc4bd7dc5ea7e61b6887379 (diff) |
dmaengine: dw: platform: provide platform data for Intel
Provide platform data explicitly for Intel SoCs where dw_dmac is enumerated by
ACPI.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/dw/platform.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c index b2c3ae071429..68a4815750b5 100644 --- a/drivers/dma/dw/platform.c +++ b/drivers/dma/dw/platform.c | |||
@@ -155,6 +155,7 @@ static int dw_probe(struct platform_device *pdev) | |||
155 | struct dw_dma_chip *chip; | 155 | struct dw_dma_chip *chip; |
156 | struct device *dev = &pdev->dev; | 156 | struct device *dev = &pdev->dev; |
157 | struct resource *mem; | 157 | struct resource *mem; |
158 | const struct acpi_device_id *id; | ||
158 | struct dw_dma_platform_data *pdata; | 159 | struct dw_dma_platform_data *pdata; |
159 | int err; | 160 | int err; |
160 | 161 | ||
@@ -178,6 +179,11 @@ static int dw_probe(struct platform_device *pdev) | |||
178 | pdata = dev_get_platdata(dev); | 179 | pdata = dev_get_platdata(dev); |
179 | if (!pdata) | 180 | if (!pdata) |
180 | pdata = dw_dma_parse_dt(pdev); | 181 | pdata = dw_dma_parse_dt(pdev); |
182 | if (!pdata && has_acpi_companion(dev)) { | ||
183 | id = acpi_match_device(dev->driver->acpi_match_table, dev); | ||
184 | if (id) | ||
185 | pdata = (struct dw_dma_platform_data *)id->driver_data; | ||
186 | } | ||
181 | 187 | ||
182 | chip->dev = dev; | 188 | chip->dev = dev; |
183 | 189 | ||
@@ -246,8 +252,17 @@ MODULE_DEVICE_TABLE(of, dw_dma_of_id_table); | |||
246 | #endif | 252 | #endif |
247 | 253 | ||
248 | #ifdef CONFIG_ACPI | 254 | #ifdef CONFIG_ACPI |
255 | static struct dw_dma_platform_data dw_dma_acpi_pdata = { | ||
256 | .nr_channels = 8, | ||
257 | .is_private = true, | ||
258 | .chan_allocation_order = CHAN_ALLOCATION_ASCENDING, | ||
259 | .chan_priority = CHAN_PRIORITY_ASCENDING, | ||
260 | .block_size = 4095, | ||
261 | .nr_masters = 2, | ||
262 | }; | ||
263 | |||
249 | static const struct acpi_device_id dw_dma_acpi_id_table[] = { | 264 | static const struct acpi_device_id dw_dma_acpi_id_table[] = { |
250 | { "INTL9C60", 0 }, | 265 | { "INTL9C60", (kernel_ulong_t)&dw_dma_acpi_pdata }, |
251 | { } | 266 | { } |
252 | }; | 267 | }; |
253 | MODULE_DEVICE_TABLE(acpi, dw_dma_acpi_id_table); | 268 | MODULE_DEVICE_TABLE(acpi, dw_dma_acpi_id_table); |