diff options
author | Mans Rullgard <mans@mansr.com> | 2016-01-09 07:45:11 -0500 |
---|---|---|
committer | Hans-Christian Egtvedt <egtvedt@samfundet.no> | 2016-01-14 07:40:30 -0500 |
commit | 238d1c6041ebcb5ce7c075b696f6cc9962991e94 (patch) | |
tree | a61281ea931a972e71aa80bc9cc9d09c4b480d16 /arch/avr32 | |
parent | 74843787158e9dff249f0528e7d4806102cc2c26 (diff) |
mmc: atmel: get rid of struct mci_dma_data
As struct mci_dma_data is now only used by AVR32, it is nothing but
pointless indirection. Replace it with struct dw_dma_slave in the
AVR32 platform code and with a void pointer elsewhere.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'arch/avr32')
-rw-r--r-- | arch/avr32/mach-at32ap/at32ap700x.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index 6e906172dc33..bf445aa48282 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/spi/spi.h> | 17 | #include <linux/spi/spi.h> |
18 | #include <linux/usb/atmel_usba_udc.h> | 18 | #include <linux/usb/atmel_usba_udc.h> |
19 | 19 | ||
20 | #include <linux/platform_data/mmc-atmel-mci.h> | ||
21 | #include <linux/atmel-mci.h> | 20 | #include <linux/atmel-mci.h> |
22 | 21 | ||
23 | #include <asm/io.h> | 22 | #include <asm/io.h> |
@@ -1323,13 +1322,13 @@ static struct clk atmel_mci0_pclk = { | |||
1323 | 1322 | ||
1324 | static bool at32_mci_dma_filter(struct dma_chan *chan, void *pdata) | 1323 | static bool at32_mci_dma_filter(struct dma_chan *chan, void *pdata) |
1325 | { | 1324 | { |
1326 | struct mci_dma_data *sl = pdata; | 1325 | struct dw_dma_slave *sl = pdata; |
1327 | 1326 | ||
1328 | if (!sl) | 1327 | if (!sl) |
1329 | return false; | 1328 | return false; |
1330 | 1329 | ||
1331 | if (find_slave_dev(sl) == chan->device->dev) { | 1330 | if (sl->dma_dev == chan->device->dev) { |
1332 | chan->private = slave_data_ptr(sl); | 1331 | chan->private = sl; |
1333 | return true; | 1332 | return true; |
1334 | } | 1333 | } |
1335 | 1334 | ||
@@ -1340,7 +1339,7 @@ struct platform_device *__init | |||
1340 | at32_add_device_mci(unsigned int id, struct mci_platform_data *data) | 1339 | at32_add_device_mci(unsigned int id, struct mci_platform_data *data) |
1341 | { | 1340 | { |
1342 | struct platform_device *pdev; | 1341 | struct platform_device *pdev; |
1343 | struct mci_dma_data *slave; | 1342 | struct dw_dma_slave *slave; |
1344 | u32 pioa_mask; | 1343 | u32 pioa_mask; |
1345 | u32 piob_mask; | 1344 | u32 piob_mask; |
1346 | 1345 | ||
@@ -1359,15 +1358,15 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data) | |||
1359 | ARRAY_SIZE(atmel_mci0_resource))) | 1358 | ARRAY_SIZE(atmel_mci0_resource))) |
1360 | goto fail; | 1359 | goto fail; |
1361 | 1360 | ||
1362 | slave = kzalloc(sizeof(struct mci_dma_data), GFP_KERNEL); | 1361 | slave = kzalloc(sizeof(*slave), GFP_KERNEL); |
1363 | if (!slave) | 1362 | if (!slave) |
1364 | goto fail; | 1363 | goto fail; |
1365 | 1364 | ||
1366 | slave->sdata.dma_dev = &dw_dmac0_device.dev; | 1365 | slave->dma_dev = &dw_dmac0_device.dev; |
1367 | slave->sdata.src_id = 0; | 1366 | slave->src_id = 0; |
1368 | slave->sdata.dst_id = 1; | 1367 | slave->dst_id = 1; |
1369 | slave->sdata.src_master = 1; | 1368 | slave->src_master = 1; |
1370 | slave->sdata.dst_master = 0; | 1369 | slave->dst_master = 0; |
1371 | 1370 | ||
1372 | data->dma_slave = slave; | 1371 | data->dma_slave = slave; |
1373 | data->dma_filter = at32_mci_dma_filter; | 1372 | data->dma_filter = at32_mci_dma_filter; |