mmc: mediatek: Add Mediatek MMC driver

Add Mediatek MMC driver code
Support eMMC/SD/SDIO

Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Chaotian Jing 2015-06-15 19:20:48 +08:00 committed by Ulf Hansson
parent 4c31d50d3e
commit 208489032b
4 changed files with 1389 additions and 0 deletions

View File

@ -776,3 +776,11 @@ config MMC_TOSHIBA_PCI
tristate "Toshiba Type A SD/MMC Card Interface Driver" tristate "Toshiba Type A SD/MMC Card Interface Driver"
depends on PCI depends on PCI
help help
config MMC_MTK
tristate "MediaTek SD/MMC Card Interface support"
help
This selects the MediaTek(R) Secure digital and Multimedia card Interface.
If you have a machine with a integrated SD/MMC card reader, say Y or M here.
This is needed if support for any SD/SDIO/MMC devices is required.
If unsure, say N.

View File

@ -20,6 +20,7 @@ obj-$(CONFIG_MMC_SDHCI_F_SDH30) += sdhci_f_sdh30.o
obj-$(CONFIG_MMC_SDHCI_SPEAR) += sdhci-spear.o obj-$(CONFIG_MMC_SDHCI_SPEAR) += sdhci-spear.o
obj-$(CONFIG_MMC_WBSD) += wbsd.o obj-$(CONFIG_MMC_WBSD) += wbsd.o
obj-$(CONFIG_MMC_AU1X) += au1xmmc.o obj-$(CONFIG_MMC_AU1X) += au1xmmc.o
obj-$(CONFIG_MMC_MTK) += mtk-sd.o
obj-$(CONFIG_MMC_OMAP) += omap.o obj-$(CONFIG_MMC_OMAP) += omap.o
obj-$(CONFIG_MMC_OMAP_HS) += omap_hsmmc.o obj-$(CONFIG_MMC_OMAP_HS) += omap_hsmmc.o
obj-$(CONFIG_MMC_ATMELMCI) += atmel-mci.o obj-$(CONFIG_MMC_ATMELMCI) += atmel-mci.o

1379
drivers/mmc/host/mtk-sd.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -121,6 +121,7 @@ struct mmc_data {
struct mmc_request *mrq; /* associated request */ struct mmc_request *mrq; /* associated request */
unsigned int sg_len; /* size of scatter list */ unsigned int sg_len; /* size of scatter list */
int sg_count; /* mapped sg entries */
struct scatterlist *sg; /* I/O scatter list */ struct scatterlist *sg; /* I/O scatter list */
s32 host_cookie; /* host private data */ s32 host_cookie; /* host private data */
}; };