summaryrefslogtreecommitdiff
path: root/drivers/mmc/ftsdc021_sdhci.c
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2013-12-10 09:33:13 -0500
committerTom Rini <trini@ti.com>2013-12-10 09:33:13 -0500
commite1e3de79515b95712a41f52c86a0181530f2fc03 (patch)
treee41ab8c6797adcfde2f468d8ced1768c61f66bda /drivers/mmc/ftsdc021_sdhci.c
parent76a8265b4f54d1b9cd2b70efb46dcdeaa5d20bfb (diff)
parentadebb98ba12008021e75a2881deb424db0184770 (diff)
downloadolio-uboot-2014.01-e1e3de79515b95712a41f52c86a0181530f2fc03.tar.xz
olio-uboot-2014.01-e1e3de79515b95712a41f52c86a0181530f2fc03.zip
Merge branch 'master' of git://git.denx.de/u-boot-mmc
Diffstat (limited to 'drivers/mmc/ftsdc021_sdhci.c')
-rw-r--r--drivers/mmc/ftsdc021_sdhci.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/mmc/ftsdc021_sdhci.c b/drivers/mmc/ftsdc021_sdhci.c
new file mode 100644
index 000000000..1f6cdba17
--- /dev/null
+++ b/drivers/mmc/ftsdc021_sdhci.c
@@ -0,0 +1,33 @@
+/*
+ * (C) Copyright 2013 Faraday Technology
+ * Kuo-Jung Su <dantesu@faraday-tech.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <malloc.h>
+#include <sdhci.h>
+
+#ifndef CONFIG_FTSDC021_CLOCK
+#define CONFIG_FTSDC021_CLOCK clk_get_rate("MMC")
+#endif
+
+int ftsdc021_sdhci_init(u32 regbase)
+{
+ struct sdhci_host *host = NULL;
+ uint32_t freq = CONFIG_FTSDC021_CLOCK;
+
+ host = calloc(1, sizeof(struct sdhci_host));
+ if (!host) {
+ puts("sdh_host malloc fail!\n");
+ return 1;
+ }
+
+ host->name = "FTSDC021";
+ host->ioaddr = (void __iomem *)regbase;
+ host->quirks = 0;
+ add_sdhci(host, freq, 0);
+
+ return 0;
+}