xref: /openbmc/u-boot/drivers/mmc/mv_sdhci.c (revision 9691c5b9)
1 #include <common.h>
2 #include <malloc.h>
3 #include <sdhci.h>
4 
5 static char *MVSDH_NAME = "mv_sdh";
6 int mv_sdh_init(u32 regbase, u32 max_clk, u32 min_clk, u32 quirks)
7 {
8 	struct sdhci_host *host = NULL;
9 	host = (struct sdhci_host *)malloc(sizeof(struct sdhci_host));
10 	if (!host) {
11 		printf("sdh_host malloc fail!\n");
12 		return 1;
13 	}
14 
15 	host->name = MVSDH_NAME;
16 	host->ioaddr = (void *)regbase;
17 	host->quirks = quirks;
18 	host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
19 	add_sdhci(host, max_clk, min_clk);
20 	return 0;
21 }
22