]> git.ipfire.org Git - people/ms/u-boot.git/blob - drivers/mmc/spear_sdhci.c
mmc: sdhci: use the host version value in sdhci_setup_cfg
[people/ms/u-boot.git] / drivers / mmc / spear_sdhci.c
1 /*
2 * (C) Copyright 2012
3 * Vipin Kumar, ST Micoelectronics, vipin.kumar@st.com.
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8 #include <common.h>
9 #include <malloc.h>
10 #include <sdhci.h>
11
12 int spear_sdhci_init(u32 regbase, u32 max_clk, u32 min_clk, u32 quirks)
13 {
14 struct sdhci_host *host = NULL;
15 host = (struct sdhci_host *)malloc(sizeof(struct sdhci_host));
16 if (!host) {
17 printf("sdhci host malloc fail!\n");
18 return 1;
19 }
20
21 host->name = "sdhci";
22 host->ioaddr = (void *)regbase;
23 host->quirks = quirks;
24
25 add_sdhci(host, max_clk, min_clk);
26 return 0;
27 }