]>
git.ipfire.org Git - thirdparty/u-boot.git/blob - drivers/mmc/spear_sdhci.c
3 * Vipin Kumar, ST Micoelectronics, vipin.kumar@st.com.
5 * SPDX-License-Identifier: GPL-2.0+
12 int spear_sdhci_init(u32 regbase
, u32 max_clk
, u32 min_clk
, u32 quirks
)
14 struct sdhci_host
*host
= NULL
;
15 host
= (struct sdhci_host
*)malloc(sizeof(struct sdhci_host
));
17 printf("sdhci host malloc fail!\n");
22 host
->ioaddr
= (void *)regbase
;
23 host
->quirks
= quirks
;
25 if (quirks
& SDHCI_QUIRK_REG32_RW
)
26 host
->version
= sdhci_readl(host
, SDHCI_HOST_VERSION
- 2) >> 16;
28 host
->version
= sdhci_readw(host
, SDHCI_HOST_VERSION
);
30 add_sdhci(host
, max_clk
, min_clk
);