diff options
| author | Lei Wen <leiwen@marvell.com> | 2011-06-28 21:50:07 +0000 | 
|---|---|---|
| committer | Andy Fleming <afleming@freescale.com> | 2011-07-15 20:29:19 -0500 | 
| commit | e75787d903e75095806f42f793328940656ea783 (patch) | |
| tree | ac7b26ebbf4f39eabfb21774f0253d01712cf7df /drivers/mmc/mv_sdhci.c | |
| parent | af62a55785b95c1d52fc538387aaf66ffae1513c (diff) | |
| download | olio-uboot-2014.01-e75787d903e75095806f42f793328940656ea783.tar.xz olio-uboot-2014.01-e75787d903e75095806f42f793328940656ea783.zip | |
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 <leiwen@marvell.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'drivers/mmc/mv_sdhci.c')
| -rw-r--r-- | drivers/mmc/mv_sdhci.c | 21 | 
1 files changed, 21 insertions, 0 deletions
| diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c new file mode 100644 index 000000000..9e5995103 --- /dev/null +++ b/drivers/mmc/mv_sdhci.c @@ -0,0 +1,21 @@ +#include <common.h> +#include <malloc.h> +#include <sdhci.h> + +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; +} |