From: Lei Wen Date: Tue, 28 Jun 2011 21:50:07 +0000 (+0000) Subject: MMC: add marvell sdhci driver X-Git-Tag: v2011.09-rc1~217^2~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e75787d903e75095806f42f793328940656ea783;p=u-boot MMC: add marvell sdhci driver This could support both armada100 and pantheon serial in the mainline, while this driver also be tested to support upcoming mg, mmp2 and mmp3 hardware. Signed-off-by: Lei Wen Acked-by: Andy Fleming --- diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile index d08c828013..14f66877de 100644 --- a/drivers/mmc/Makefile +++ b/drivers/mmc/Makefile @@ -33,6 +33,7 @@ COBJS-$(CONFIG_GENERIC_MMC) += mmc.o COBJS-$(CONFIG_GENERIC_ATMEL_MCI) += gen_atmel_mci.o COBJS-$(CONFIG_MMC_SPI) += mmc_spi.o COBJS-$(CONFIG_ARM_PL180_MMCI) += arm_pl180_mmci.o +COBJS-$(CONFIG_MV_SDHCI) += mv_sdhci.o COBJS-$(CONFIG_MXC_MMC) += mxcmmc.o COBJS-$(CONFIG_OMAP3_MMC) += omap3_mmc.o COBJS-$(CONFIG_OMAP_HSMMC) += omap_hsmmc.o diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c new file mode 100644 index 0000000000..9e5995103c --- /dev/null +++ b/drivers/mmc/mv_sdhci.c @@ -0,0 +1,21 @@ +#include +#include +#include + +static char *MVSDH_NAME = "mv_sdh"; +int mv_sdh_init(u32 regbase, u32 max_clk, u32 min_clk, u32 quirks) +{ + struct sdhci_host *host = NULL; + host = (struct sdhci_host *)malloc(sizeof(struct sdhci_host)); + if (!host) { + printf("sdh_host malloc fail!\n"); + return 1; + } + + host->name = MVSDH_NAME; + host->ioaddr = (void *)regbase; + host->quirks = quirks; + host->version = sdhci_readw(host, SDHCI_HOST_VERSION); + add_sdhci(host, max_clk, min_clk); + return 0; +}