blob: 9e5995103c7da7e65d679ad2c85c7c55324991a9 [file] [log] [blame]
Lei Wene75787d2011-06-28 21:50:07 +00001#include <common.h>
2#include <malloc.h>
3#include <sdhci.h>
4
5static char *MVSDH_NAME = "mv_sdh";
6int 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}