
Use phys2bus macro when dma address is accessed. After applied it, SDMA mode can be used.
When thor download is used, - Before : 1.8MB/s - After : 7.23MB/s
Signed-off-by: Jaehoon Chung jh80.chung@samsung.com --- drivers/mmc/bcm2835_sdhci.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c index 39c93db275..222ba22d66 100644 --- a/drivers/mmc/bcm2835_sdhci.c +++ b/drivers/mmc/bcm2835_sdhci.c @@ -46,6 +46,7 @@ #include <asm/arch/mbox.h> #include <mach/sdhci.h> #include <mach/timer.h> +#include <phys2bus.h>
/* 400KHz is max freq for card ID etc. Use that as min */ #define MIN_FREQ 400000 @@ -86,7 +87,11 @@ static inline void bcm2835_sdhci_raw_writel(struct sdhci_host *host, u32 val, ; }
- writel(val, host->ioaddr + reg); + if (reg == SDHCI_DMA_ADDRESS) + writel(phys_to_bus((unsigned long)val), host->ioaddr + reg); + else + writel(val, host->ioaddr + reg); + bcm_host->last_write = timer_get_us(); }