Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: atmel-mci: AP700x PDC is not connected to MCI

Earlier, atmel-mci was adapted to make use of the peripheral DMA
controller (PDC), in case normal DMA wouldn't work.
( http://comments.gmane.org/gmane.linux.kernel.mmc/9403 )

This works OK on ARM platforms (AT91), but it broke the driver
for AVR32, the AP700x. Although the MCI has PDC support, the
connection is not done for AVR chips.

This patch makes the use of PDC depend on !CONFIG_AVR32.

Signed-off-by: Hein Tibosch <hein_tibosch@yahoo.es>
Signed-off-by: Chris Ball <cjb@laptop.org>

authored by

Hein_Tibosch and committed by
Chris Ball
6bf2af8c ccdfe612

+8 -1
+7
drivers/mmc/host/atmel-mci-regs.h
··· 140 140 #define atmci_writel(port,reg,value) \ 141 141 __raw_writel((value), (port)->regs + reg) 142 142 143 + /* On AVR chips the Peripheral DMA Controller is not connected to MCI. */ 144 + #ifdef CONFIG_AVR32 145 + # define ATMCI_PDC_CONNECTED 0 146 + #else 147 + # define ATMCI_PDC_CONNECTED 1 148 + #endif 149 + 143 150 /* 144 151 * Fix sconfig's burst size according to atmel MCI. We need to convert them as: 145 152 * 1 -> 0, 4 -> 1, 8 -> 2, 16 -> 3.
+1 -1
drivers/mmc/host/atmel-mci.c
··· 2290 2290 "version: 0x%x\n", version); 2291 2291 2292 2292 host->caps.has_dma_conf_reg = 0; 2293 - host->caps.has_pdc = 1; 2293 + host->caps.has_pdc = ATMCI_PDC_CONNECTED; 2294 2294 host->caps.has_cfg_reg = 0; 2295 2295 host->caps.has_cstor_reg = 0; 2296 2296 host->caps.has_highspeed = 0;