aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/mach-at32ap
diff options
context:
space:
mode:
Diffstat (limited to 'arch/avr32/mach-at32ap')
-rw-r--r--arch/avr32/mach-at32ap/at32ap700x.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index 9967d5a3b6eb..f1b9a3ac2733 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -1273,6 +1273,7 @@ struct platform_device *__init
1273at32_add_device_mci(unsigned int id, struct mci_platform_data *data) 1273at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
1274{ 1274{
1275 struct platform_device *pdev; 1275 struct platform_device *pdev;
1276 struct dw_dma_slave *dws;
1276 1277
1277 if (id != 0 || !data) 1278 if (id != 0 || !data)
1278 return NULL; 1279 return NULL;
@@ -1289,6 +1290,21 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
1289 ARRAY_SIZE(atmel_mci0_resource))) 1290 ARRAY_SIZE(atmel_mci0_resource)))
1290 goto fail; 1291 goto fail;
1291 1292
1293 if (data->dma_slave)
1294 dws = kmemdup(to_dw_dma_slave(data->dma_slave),
1295 sizeof(struct dw_dma_slave), GFP_KERNEL);
1296 else
1297 dws = kzalloc(sizeof(struct dw_dma_slave), GFP_KERNEL);
1298
1299 dws->slave.dev = &pdev->dev;
1300 dws->slave.dma_dev = &dw_dmac0_device.dev;
1301 dws->slave.reg_width = DMA_SLAVE_WIDTH_32BIT;
1302 dws->cfg_hi = (DWC_CFGH_SRC_PER(0)
1303 | DWC_CFGH_DST_PER(1));
1304 dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL
1305 | DWC_CFGL_HS_SRC_POL);
1306
1307 data->dma_slave = &dws->slave;
1292 1308
1293 if (platform_device_add_data(pdev, data, 1309 if (platform_device_add_data(pdev, data,
1294 sizeof(struct mci_platform_data))) 1310 sizeof(struct mci_platform_data)))