git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
[pandora-kernel.git]
/
drivers
/
mmc
/
host
/
tmio_mmc_dma.c
diff --git
a/drivers/mmc/host/tmio_mmc_dma.c
b/drivers/mmc/host/tmio_mmc_dma.c
index
25f1ad6
..
2aa616d
100644
(file)
--- a/
drivers/mmc/host/tmio_mmc_dma.c
+++ b/
drivers/mmc/host/tmio_mmc_dma.c
@@
-22,11
+22,14
@@
#define TMIO_MMC_MIN_DMA_LEN 8
#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? */
#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
}
#endif
}