summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/mmci.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@stericsson.com>2009-09-14 13:57:11 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-09-15 23:11:06 +0200
commit9e6c82cd3e1a739ef48bf8c1decc8e7a7d8de3ac (patch)
tree3146dbc92480e9034e138bbff11912ff8936fc0b /drivers/mmc/host/mmci.c
parentARM: 5697/1: MMCI Break out clock divider setup (diff)
downloadlinux-9e6c82cd3e1a739ef48bf8c1decc8e7a7d8de3ac.tar.xz
linux-9e6c82cd3e1a739ef48bf8c1decc8e7a7d8de3ac.zip
ARM: 5698/1: MMCI pass capabilities in platform data
This makes it possible to pass down the host controller capabilities for the MMCI driver using the platform data. It also provides the capabilties for the U300 implementation as an example, and makes sure the 4bit wide mode is set if this is requested by the ios() now that we can actually set that capability for a platform. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mmc/host/mmci.c')
-rw-r--r--drivers/mmc/host/mmci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 031141a7c87e..bf7c05b29e2c 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -62,6 +62,9 @@ static void mmci_set_clkreg(struct mmci_host *host, unsigned int desired)
/* clk |= MCI_CLK_PWRSAVE; */
}
+ if (host->mmc->ios.bus_width == MMC_BUS_WIDTH_4)
+ clk |= MCI_WIDE_BUS;
+
writel(clk, host->base + MMCICLOCK);
}
@@ -601,6 +604,7 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
mmc->f_min = (host->mclk + 511) / 512;
mmc->f_max = min(host->mclk, fmax);
mmc->ocr_avail = plat->ocr_mask;
+ mmc->caps = plat->capabilities;
/*
* We can do SGIO