diff options
author | Linus Walleij <linus.walleij@stericsson.com> | 2009-09-14 07:57:11 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-15 17:11:06 -0400 |
commit | 9e6c82cd3e1a739ef48bf8c1decc8e7a7d8de3ac (patch) | |
tree | 3146dbc92480e9034e138bbff11912ff8936fc0b | |
parent | a6a6464a0ecd20c5f1594a4fe5b24af6181b7366 (diff) |
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>
-rw-r--r-- | arch/arm/include/asm/mach/mmc.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-u300/mmc.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/mmci.c | 4 |
3 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/include/asm/mach/mmc.h b/arch/arm/include/asm/mach/mmc.h index b490ecc79def..27bec555ee16 100644 --- a/arch/arm/include/asm/mach/mmc.h +++ b/arch/arm/include/asm/mach/mmc.h | |||
@@ -12,6 +12,7 @@ struct mmc_platform_data { | |||
12 | unsigned int (*status)(struct device *); | 12 | unsigned int (*status)(struct device *); |
13 | int gpio_wp; | 13 | int gpio_wp; |
14 | int gpio_cd; | 14 | int gpio_cd; |
15 | unsigned long capabilities; | ||
15 | }; | 16 | }; |
16 | 17 | ||
17 | #endif | 18 | #endif |
diff --git a/arch/arm/mach-u300/mmc.c b/arch/arm/mach-u300/mmc.c index 585cc013639d..089b9957b6a4 100644 --- a/arch/arm/mach-u300/mmc.c +++ b/arch/arm/mach-u300/mmc.c | |||
@@ -158,6 +158,8 @@ int __devinit mmc_init(struct amba_device *adev) | |||
158 | mmci_card->mmc0_plat_data.status = mmc_status; | 158 | mmci_card->mmc0_plat_data.status = mmc_status; |
159 | mmci_card->mmc0_plat_data.gpio_wp = -1; | 159 | mmci_card->mmc0_plat_data.gpio_wp = -1; |
160 | mmci_card->mmc0_plat_data.gpio_cd = -1; | 160 | mmci_card->mmc0_plat_data.gpio_cd = -1; |
161 | mmci_card->mmc0_plat_data.capabilities = MMC_CAP_MMC_HIGHSPEED | | ||
162 | MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA; | ||
161 | 163 | ||
162 | mmcsd_device->platform_data = (void *) &mmci_card->mmc0_plat_data; | 164 | mmcsd_device->platform_data = (void *) &mmci_card->mmc0_plat_data; |
163 | 165 | ||
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) | |||
62 | /* clk |= MCI_CLK_PWRSAVE; */ | 62 | /* clk |= MCI_CLK_PWRSAVE; */ |
63 | } | 63 | } |
64 | 64 | ||
65 | if (host->mmc->ios.bus_width == MMC_BUS_WIDTH_4) | ||
66 | clk |= MCI_WIDE_BUS; | ||
67 | |||
65 | writel(clk, host->base + MMCICLOCK); | 68 | writel(clk, host->base + MMCICLOCK); |
66 | } | 69 | } |
67 | 70 | ||
@@ -601,6 +604,7 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id) | |||
601 | mmc->f_min = (host->mclk + 511) / 512; | 604 | mmc->f_min = (host->mclk + 511) / 512; |
602 | mmc->f_max = min(host->mclk, fmax); | 605 | mmc->f_max = min(host->mclk, fmax); |
603 | mmc->ocr_avail = plat->ocr_mask; | 606 | mmc->ocr_avail = plat->ocr_mask; |
607 | mmc->caps = plat->capabilities; | ||
604 | 608 | ||
605 | /* | 609 | /* |
606 | * We can do SGIO | 610 | * We can do SGIO |