blob: 06179cd9f4165f0f3570898cee499d469c129d65 [file] [log] [blame]
Vipin Kumar23b00422012-12-05 20:44:09 +00001/*
2 * (C) Copyright 2012
3 * Vipin Kumar, ST Micoelectronics, vipin.kumar@st.com.
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Vipin Kumar23b00422012-12-05 20:44:09 +00006 */
7
8#include <common.h>
9#include <malloc.h>
10#include <sdhci.h>
11
12int 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
Vipin Kumar23b00422012-12-05 20:44:09 +000025 add_sdhci(host, max_clk, min_clk);
26 return 0;
27}