X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=drivers%2Fmmc%2Fhost%2Ftmio_mmc_dma.c;h=86f259cdfcbcbe620206cc1c479395759fb2b2ad;hp=25f1ad6cbe098a9d4cd2b270423eade6d6cb4326;hb=4d4abdcb1dee03a4f9d6d2021622ed07e14dfd17;hpb=63bc9750167ac765827470aa5aed1e79aeaaad9e diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c index 25f1ad6cbe09..86f259cdfcbc 100644 --- a/drivers/mmc/host/tmio_mmc_dma.c +++ b/drivers/mmc/host/tmio_mmc_dma.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -22,11 +23,14 @@ #define TMIO_MMC_MIN_DMA_LEN 8 -static void tmio_mmc_enable_dma(struct tmio_mmc_host *host, bool enable) +void tmio_mmc_enable_dma(struct tmio_mmc_host *host, bool enable) { + if (!host->chan_tx || !host->chan_rx) + return; + #if defined(CONFIG_SUPERH) || defined(CONFIG_ARCH_SHMOBILE) /* Switch DMA mode on or off - SuperH specific? */ - writew(enable ? 2 : 0, host->ctl + (0xd8 << host->bus_shift)); + sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ? 2 : 0); #endif }