summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/pxamci.c
diff options
context:
space:
mode:
authorBridge Wu <mingqiao.wu@gmail.com>2007-09-25 19:09:19 +0200
committerPierre Ossman <drzeus@drzeus.cx>2007-09-25 19:11:39 +0200
commitdf456f479aa6fdc812df51627c6f2c21d8a1aed8 (patch)
tree8f8dd50213d429850e974fb3e996e5a150c8e1b2 /drivers/mmc/host/pxamci.c
parentmmc: pxamci: set proper block capabilities according to PXA flavor (diff)
downloadlinux-df456f479aa6fdc812df51627c6f2c21d8a1aed8.tar.xz
linux-df456f479aa6fdc812df51627c6f2c21d8a1aed8.zip
mmc: pxamci: set proper buswidth capabilities according to PXA flavor
From PXA27x, it is possible to do 4-bit data transfers. Signed-off-by: Bridge Wu <mingqiao.wu@gmail.com> Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/host/pxamci.c')
-rw-r--r--drivers/mmc/host/pxamci.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index 67acc6a00895..6549f546df55 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -284,7 +284,7 @@ static int pxamci_data_done(struct pxamci_host *host, unsigned int stat)
host->data = NULL;
if (host->mrq->stop) {
pxamci_stop_clock(host);
- pxamci_start_cmd(host, host->mrq->stop, 0);
+ pxamci_start_cmd(host, host->mrq->stop, host->cmdat);
} else {
pxamci_finish_request(host, host->mrq);
}
@@ -382,6 +382,11 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
host->cmdat |= CMDAT_INIT;
}
+ if (ios->bus_width == MMC_BUS_WIDTH_4)
+ host->cmdat |= CMDAT_SD_4DAT;
+ else
+ host->cmdat &= ~CMDAT_SD_4DAT;
+
pr_debug("PXAMCI: clkrt = %x cmdat = %x\n",
host->clkrt, host->cmdat);
}
@@ -460,6 +465,9 @@ static int pxamci_probe(struct platform_device *pdev)
mmc->ocr_avail = host->pdata ?
host->pdata->ocr_mask :
MMC_VDD_32_33|MMC_VDD_33_34;
+ mmc->caps = 0;
+ if (!cpu_is_pxa21x() && !cpu_is_pxa25x())
+ mmc->caps |= MMC_CAP_4_BIT_DATA;
host->sg_cpu = dma_alloc_coherent(&pdev->dev, PAGE_SIZE, &host->sg_dma, GFP_KERNEL);
if (!host->sg_cpu) {