aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/au1xmmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/au1xmmc.c')
-rw-r--r--drivers/mmc/host/au1xmmc.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
index 92c4d0dfee43..bcbb6d247bf7 100644
--- a/drivers/mmc/host/au1xmmc.c
+++ b/drivers/mmc/host/au1xmmc.c
@@ -340,7 +340,7 @@ static void au1xmmc_send_pio(struct au1xmmc_host *host)
340 340
341 /* This is the pointer to the data buffer */ 341 /* This is the pointer to the data buffer */
342 sg = &data->sg[host->pio.index]; 342 sg = &data->sg[host->pio.index];
343 sg_ptr = page_address(sg->page) + sg->offset + host->pio.offset; 343 sg_ptr = sg_virt(sg) + host->pio.offset;
344 344
345 /* This is the space left inside the buffer */ 345 /* This is the space left inside the buffer */
346 sg_len = data->sg[host->pio.index].length - host->pio.offset; 346 sg_len = data->sg[host->pio.index].length - host->pio.offset;
@@ -400,7 +400,7 @@ static void au1xmmc_receive_pio(struct au1xmmc_host *host)
400 400
401 if (host->pio.index < host->dma.len) { 401 if (host->pio.index < host->dma.len) {
402 sg = &data->sg[host->pio.index]; 402 sg = &data->sg[host->pio.index];
403 sg_ptr = page_address(sg->page) + sg->offset + host->pio.offset; 403 sg_ptr = sg_virt(sg) + host->pio.offset;
404 404
405 /* This is the space left inside the buffer */ 405 /* This is the space left inside the buffer */
406 sg_len = sg_dma_len(&data->sg[host->pio.index]) - host->pio.offset; 406 sg_len = sg_dma_len(&data->sg[host->pio.index]) - host->pio.offset;
@@ -613,14 +613,11 @@ au1xmmc_prepare_data(struct au1xmmc_host *host, struct mmc_data *data)
613 613
614 if (host->flags & HOST_F_XMIT){ 614 if (host->flags & HOST_F_XMIT){
615 ret = au1xxx_dbdma_put_source_flags(channel, 615 ret = au1xxx_dbdma_put_source_flags(channel,
616 (void *) (page_address(sg->page) + 616 (void *) sg_virt(sg), len, flags);
617 sg->offset),
618 len, flags);
619 } 617 }
620 else { 618 else {
621 ret = au1xxx_dbdma_put_dest_flags(channel, 619 ret = au1xxx_dbdma_put_dest_flags(channel,
622 (void *) (page_address(sg->page) + 620 (void *) sg_virt(sg),
623 sg->offset),
624 len, flags); 621 len, flags);
625 } 622 }
626 623