Skip to content

Commit 238d1c6

Browse files
mansregtvedt
authored andcommitted
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>
1 parent 7484378 commit 238d1c6

File tree

4 files changed

+11
-35
lines changed

4 files changed

+11
-35
lines changed

arch/avr32/mach-at32ap/at32ap700x.c

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include <linux/spi/spi.h>
1818
#include <linux/usb/atmel_usba_udc.h>
1919

20-
#include <linux/platform_data/mmc-atmel-mci.h>
2120
#include <linux/atmel-mci.h>
2221

2322
#include <asm/io.h>
@@ -1323,13 +1322,13 @@ static struct clk atmel_mci0_pclk = {
13231322

13241323
static bool at32_mci_dma_filter(struct dma_chan *chan, void *pdata)
13251324
{
1326-
struct mci_dma_data *sl = pdata;
1325+
struct dw_dma_slave *sl = pdata;
13271326

13281327
if (!sl)
13291328
return false;
13301329

1331-
if (find_slave_dev(sl) == chan->device->dev) {
1332-
chan->private = slave_data_ptr(sl);
1330+
if (sl->dma_dev == chan->device->dev) {
1331+
chan->private = sl;
13331332
return true;
13341333
}
13351334

@@ -1340,7 +1339,7 @@ struct platform_device *__init
13401339
at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
13411340
{
13421341
struct platform_device *pdev;
1343-
struct mci_dma_data *slave;
1342+
struct dw_dma_slave *slave;
13441343
u32 pioa_mask;
13451344
u32 piob_mask;
13461345

@@ -1359,15 +1358,15 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
13591358
ARRAY_SIZE(atmel_mci0_resource)))
13601359
goto fail;
13611360

1362-
slave = kzalloc(sizeof(struct mci_dma_data), GFP_KERNEL);
1361+
slave = kzalloc(sizeof(*slave), GFP_KERNEL);
13631362
if (!slave)
13641363
goto fail;
13651364

1366-
slave->sdata.dma_dev = &dw_dmac0_device.dev;
1367-
slave->sdata.src_id = 0;
1368-
slave->sdata.dst_id = 1;
1369-
slave->sdata.src_master = 1;
1370-
slave->sdata.dst_master = 0;
1365+
slave->dma_dev = &dw_dmac0_device.dev;
1366+
slave->src_id = 0;
1367+
slave->dst_id = 1;
1368+
slave->src_master = 1;
1369+
slave->dst_master = 0;
13711370

13721371
data->dma_slave = slave;
13731372
data->dma_filter = at32_mci_dma_filter;

drivers/mmc/host/atmel-mci.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <linux/slab.h>
3030
#include <linux/stat.h>
3131
#include <linux/types.h>
32-
#include <linux/platform_data/mmc-atmel-mci.h>
3332

3433
#include <linux/mmc/host.h>
3534
#include <linux/mmc/sdio.h>

include/linux/atmel-mci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct mci_slot_pdata {
3737
* @slot: Per-slot configuration data.
3838
*/
3939
struct mci_platform_data {
40-
struct mci_dma_data *dma_slave;
40+
void *dma_slave;
4141
dma_filter_fn dma_filter;
4242
struct mci_slot_pdata slot[ATMCI_MAX_NR_SLOTS];
4343
};

include/linux/platform_data/mmc-atmel-mci.h

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)