Skip to content

Commit

Permalink
drivers: mmc: Bring back msm_sdcc driver
Browse files Browse the repository at this point in the history
Actually required only for Shinano, this will make bcmdhd to work
correctly. Welcome back, WiFi!
  • Loading branch information
kholk committed May 14, 2016
1 parent 2b7fb45 commit 6545c22
Show file tree
Hide file tree
Showing 8 changed files with 8,185 additions and 2 deletions.
2 changes: 2 additions & 0 deletions MAINTAINERS
Expand Up @@ -1029,6 +1029,8 @@ M: Bryan Huntsman <bryanh@codeaurora.org>
L: linux-arm-msm@vger.kernel.org
F: arch/arm/mach-msm/
F: drivers/video/msm/
F: drivers/mmc/host/msm_sdcc.c
F: drivers/mmc/host/msm_sdcc.h
F: drivers/tty/serial/msm_serial.h
F: drivers/tty/serial/msm_serial.c
F: drivers/*/pm8???-*
Expand Down
19 changes: 17 additions & 2 deletions drivers/mmc/core/sdio.c
Expand Up @@ -1141,8 +1141,7 @@ static int mmc_sdio_power_restore(struct mmc_host *host)
/* to query card if 1.8V signalling is supported */
host->ocr |= R4_18V_PRESENT;

ret = mmc_sdio_init_card(host, host->ocr, host->card,
mmc_card_keep_power(host));
ret = mmc_sdio_init_card(host, host->ocr, host->card, 0);
if (!ret && host->sdio_irqs)
mmc_signal_sdio_irq(host);

Expand Down Expand Up @@ -1330,3 +1329,19 @@ int sdio_reset_comm(struct mmc_card *card)
return mmc_power_restore_host(card->host);
}
EXPORT_SYMBOL(sdio_reset_comm);

void sdio_ctrl_power(struct mmc_host *host, bool onoff)
{
if (host == NULL)
return;

mmc_claim_host(host);
if (onoff)
mmc_power_up(host);
else
mmc_power_off(host);
/* Wait at least 1 ms according to SD spec */
mmc_delay(1);
mmc_release_host(host);
}
EXPORT_SYMBOL(sdio_ctrl_power);
95 changes: 95 additions & 0 deletions drivers/mmc/host/Kconfig
Expand Up @@ -475,6 +475,101 @@ config MMC_SDRICOH_CS
config MMC_TMIO_CORE
tristate

config MMC_MSM
tristate "Qualcomm SDCC Controller Support"
depends on MMC && ARCH_MSM
help
This provides support for the SD/MMC cell found in the
MSM and QSD SOCs from Qualcomm.

config MMC_MSM_SDC1_SUPPORT
boolean "Qualcomm SDC1 support"
depends on MMC_MSM
default y
help
Select Y to enable Slot 1.

config MMC_MSM_SDC1_8_BIT_SUPPORT
boolean "Qualcomm SDC1 8bit support"
depends on MMC_MSM_SDC1_SUPPORT
default n
help
Select Y to enable 8bit support for Slot 1.

config MMC_MSM_SDC2_SUPPORT
boolean "Qualcomm SDC2 support"
depends on MMC_MSM
default y
help
Select Y to enable Slot 2.

config MMC_MSM_SDC2_8_BIT_SUPPORT
boolean "Qualcomm SDC2 8bit support"
depends on MMC_MSM_SDC2_SUPPORT
default n
help
Select Y to enable 8bit support for Slot 2.

config MMC_MSM_SDC3_SUPPORT
boolean "Qualcomm SDC3 support"
depends on MMC_MSM
default n
help
Select Y to enable Slot 3.

config MMC_MSM_SDC3_POLLING
boolean "Qualcomm SDC3 support"
depends on MMC_MSM

config MMC_MSM_SDC3_8_BIT_SUPPORT
boolean "Qualcomm SDC3 8bit support"
depends on MMC_MSM_SDC3_SUPPORT
default n
help
Select Y to enable 8bit support for Slot 3.

config MMC_MSM_SDC3_WP_SUPPORT
boolean "Qualcomm SDC3 write protection support"
depends on MMC_MSM_SDC3_SUPPORT
default n
help
Select Y to enable write protection support for Slot 3.

config MMC_MSM_SDC4_SUPPORT
boolean "Qualcomm SDC4 support"
depends on MMC_MSM
default n
help
Select Y to enable Slot 4.

config MMC_MSM_SDC4_8_BIT_SUPPORT
boolean "Qualcomm SDC4 8bit support"
depends on MMC_MSM_SDC4_SUPPORT
default n
help
Select Y to enable 8bit support for Slot 4.

config MMC_MSM_SDC5_SUPPORT
boolean "Qualcomm SDC5 support"
depends on MMC_MSM
default n
help
Select Y to enable Slot 5.

config MMC_MSM_SDC5_8_BIT_SUPPORT
boolean "Qualcomm SDC5 8bit support"
depends on MMC_MSM_SDC5_SUPPORT
default n
help
Select Y to enable 8bit support for Slot 5.

config MMC_MSM_SPS_SUPPORT
bool "Use SPS BAM as data mover"
depends on MMC_MSM && SPS
default n
help
Select Y to use SPS BAM as data mover

config MMC_TMIO
tristate "Toshiba Mobile IO Controller (TMIO) MMC/SD function support"
depends on MFD_TMIO || MFD_ASIC3
Expand Down
3 changes: 3 additions & 0 deletions drivers/mmc/host/Makefile
Expand Up @@ -21,6 +21,7 @@ obj-$(CONFIG_MMC_OMAP) += omap.o
obj-$(CONFIG_MMC_OMAP_HS) += omap_hsmmc.o
obj-$(CONFIG_MMC_ATMELMCI) += atmel-mci.o
obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o
obj-$(CONFIG_MMC_MSM) += msm_sdcc.o
obj-$(CONFIG_MMC_MVSDIO) += mvsdio.o
obj-$(CONFIG_MMC_DAVINCI) += davinci_mmc.o
obj-$(CONFIG_MMC_GOLDFISH) += android-goldfish.o
Expand All @@ -36,6 +37,8 @@ tmio_mmc_core-y := tmio_mmc_pio.o
tmio_mmc_core-$(subst m,y,$(CONFIG_MMC_SDHI)) += tmio_mmc_dma.o
obj-$(CONFIG_MMC_SDHI) += sh_mobile_sdhi.o
obj-$(CONFIG_MMC_CB710) += cb710-mmc.o
obj-$(CONFIG_MMC_MSM) += msm_sdcc.o
obj-$(CONFIG_MMC_MSM_SPS_SUPPORT) += msm_sdcc_dml.o
obj-$(CONFIG_MMC_CB710) += cb710-mmc.o
obj-$(CONFIG_MMC_VIA_SDMMC) += via-sdmmc.o
obj-$(CONFIG_SDH_BFIN) += bfin_sdh.o
Expand Down

0 comments on commit 6545c22

Please sign in to comment.