summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-13 17:53:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-13 17:53:03 -0400
commit8d9095c667a185c8e2449632343a2b6c65ae58f1 (patch)
tree738cdc0e1e5c96738c31ea327ac0d741349d3757 /arch
parent1a370f4cd95e056d55ef5bf1a183880e70195e59 (diff)
parent69f0fb2a592fc9ebc5e3e55178055d1cff31d479 (diff)
Merge tag 'mmc-v4.1' of git://git.linaro.org/people/ulf.hansson/mmc
Pull MMC updates from Ulf Hansson: "MMC core: - Add support for marking HPI as broken through devicetree - Enable runtime PM management of host devices - Remove the ->enable|disable() callbacks - Restructure code and cleanups - Refreshed some of the MMC sections in MAINTAINERS MMC host: - dw_mmc: HS400 mode support - dw_mmc: Add the cmd11 timer to detect a timeout - dw_mmc: Endian agnostic IO accessors - dw_mmc: Bugfixes - sh_mmcif: Add exclusion between cmd and interrupt - omap_hsmmc: Hibernation support - omap_hsmmc: Rework and simplify cover/card detect - omap_hsmmc: Stop using ->enable|disable() callbacks - atmel-mci: Endian agnostic IO - sunxi: Enable MMC_CAP_SDIO_IRQ - sdhci-st: Add support for the stih407 family silicon - sdhci-st: UHS card support in SDR104 mode - sdhci-st: HS200 mode support - sdhci-esdhc-imx: Use common mmc DT parser - sdhci-of-arasan: Use common mmc DT parser - sdhci-iproc: Add new driver for Broadcom IPROC SDHCI controller - sdhci-tegra: Convert to GPIO descriptors - sdhci-tegra: Optmize write_w path for tegra114 and later - sdhci-sirf: Update tuning procedure - sdhci: Fix card presence logic - sdhci: Cleanups and consolidation" * tag 'mmc-v4.1' of git://git.linaro.org/people/ulf.hansson/mmc: (79 commits) mmc: sdhci-st: Update ST SDHCI binding documentation. mmc: sdhci-st: Update the quirks for this controller. mmc: sdhci-st: Add sdhci_st_set_uhs_signaling function. mmc: sdhci-st: Add st_mmcss_cconfig function to configure mmcss glue registers. mmc: sdhci-st: Add delay management functions for top registers (eMMC). mmc: sdhci-st: Add support for de-asserting reset signal and top regs resource mmc: sdhci-st: Add macros for register offsets and bitfields for mmcss glue regs mmc: sdhci-esdhc-imx: Call mmc_of_parse() mmc: dw_mmc: Add locking around cmd11 timer mmc: dw_mmc: Add a return in an unexpected cmd11 timeout mmc: dw_mmc: Increase cmd11 timeout to 500ms mmc: dw_mmc: fix fifo ordering in big endian mmc: dw_mmc: change idmac descriptor files to __le32 mmc: dw_mmc: make IO accessors endian agnostic mmc: core: Convert the error field in struct mmc_command|data into an int mmc: sdhci-of-arasan: Call OF parsing for MMC mmc: sdhci-pci: fix 64 BIT DMA quirks for rtsx mmc: Add support for marking hpi as broken through devicetree mmc: sdhci-tegra: convert to use GPIO descriptors mmc: omap_hsmmc: use generic slot-gpio isr to manage card detect pin ...
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/hsmmc.c33
1 files changed, 25 insertions, 8 deletions
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index dc6e79c4484a..9a8611ab5dfa 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -150,9 +150,13 @@ static int nop_mmc_set_power(struct device *dev, int power_on, int vdd)
150static inline void omap_hsmmc_mux(struct omap_hsmmc_platform_data 150static inline void omap_hsmmc_mux(struct omap_hsmmc_platform_data
151 *mmc_controller, int controller_nr) 151 *mmc_controller, int controller_nr)
152{ 152{
153 if (gpio_is_valid(mmc_controller->switch_pin) && 153 if (gpio_is_valid(mmc_controller->gpio_cd) &&
154 (mmc_controller->switch_pin < OMAP_MAX_GPIO_LINES)) 154 (mmc_controller->gpio_cd < OMAP_MAX_GPIO_LINES))
155 omap_mux_init_gpio(mmc_controller->switch_pin, 155 omap_mux_init_gpio(mmc_controller->gpio_cd,
156 OMAP_PIN_INPUT_PULLUP);
157 if (gpio_is_valid(mmc_controller->gpio_cod) &&
158 (mmc_controller->gpio_cod < OMAP_MAX_GPIO_LINES))
159 omap_mux_init_gpio(mmc_controller->gpio_cod,
156 OMAP_PIN_INPUT_PULLUP); 160 OMAP_PIN_INPUT_PULLUP);
157 if (gpio_is_valid(mmc_controller->gpio_wp) && 161 if (gpio_is_valid(mmc_controller->gpio_wp) &&
158 (mmc_controller->gpio_wp < OMAP_MAX_GPIO_LINES)) 162 (mmc_controller->gpio_wp < OMAP_MAX_GPIO_LINES))
@@ -250,15 +254,20 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
250 mmc->internal_clock = !c->ext_clock; 254 mmc->internal_clock = !c->ext_clock;
251 mmc->reg_offset = 0; 255 mmc->reg_offset = 0;
252 256
253 mmc->switch_pin = c->gpio_cd; 257 if (c->cover_only) {
258 /* detect if mobile phone cover removed */
259 mmc->gpio_cd = -EINVAL;
260 mmc->gpio_cod = c->gpio_cd;
261 } else {
262 /* card detect pin on the mmc socket itself */
263 mmc->gpio_cd = c->gpio_cd;
264 mmc->gpio_cod = -EINVAL;
265 }
254 mmc->gpio_wp = c->gpio_wp; 266 mmc->gpio_wp = c->gpio_wp;
255 267
256 mmc->remux = c->remux; 268 mmc->remux = c->remux;
257 mmc->init_card = c->init_card; 269 mmc->init_card = c->init_card;
258 270
259 if (c->cover_only)
260 mmc->cover = 1;
261
262 if (c->nonremovable) 271 if (c->nonremovable)
263 mmc->nonremovable = 1; 272 mmc->nonremovable = 1;
264 273
@@ -358,7 +367,15 @@ void omap_hsmmc_late_init(struct omap2_hsmmc_info *c)
358 if (!mmc_pdata) 367 if (!mmc_pdata)
359 continue; 368 continue;
360 369
361 mmc_pdata->switch_pin = c->gpio_cd; 370 if (c->cover_only) {
371 /* detect if mobile phone cover removed */
372 mmc_pdata->gpio_cd = -EINVAL;
373 mmc_pdata->gpio_cod = c->gpio_cd;
374 } else {
375 /* card detect pin on the mmc socket itself */
376 mmc_pdata->gpio_cd = c->gpio_cd;
377 mmc_pdata->gpio_cod = -EINVAL;
378 }
362 mmc_pdata->gpio_wp = c->gpio_wp; 379 mmc_pdata->gpio_wp = c->gpio_wp;
363 380
364 res = omap_device_register(pdev); 381 res = omap_device_register(pdev);