]> git.ipfire.org Git - people/ms/u-boot.git/blame - drivers/mmc/zynq_sdhci.c
zynq: sdhci: Remove zynq_sdhci_of_init()
[people/ms/u-boot.git] / drivers / mmc / zynq_sdhci.c
CommitLineData
293eb33f
MS
1/*
2 * (C) Copyright 2013 Inc.
3 *
4 * Xilinx Zynq SD Host Controller Interface
5 *
1a459660 6 * SPDX-License-Identifier: GPL-2.0+
293eb33f
MS
7 */
8
9#include <common.h>
345d3c0f
MS
10#include <fdtdec.h>
11#include <libfdt.h>
293eb33f
MS
12#include <malloc.h>
13#include <sdhci.h>
14#include <asm/arch/sys_proto.h>
15
38cd2d9c 16int zynq_sdhci_init(phys_addr_t regbase)
293eb33f
MS
17{
18 struct sdhci_host *host = NULL;
19
20 host = (struct sdhci_host *)malloc(sizeof(struct sdhci_host));
21 if (!host) {
22 printf("zynq_sdhci_init: sdhci_host malloc fail\n");
23 return 1;
24 }
25
26 host->name = "zynq_sdhci";
27 host->ioaddr = (void *)regbase;
eddabd16 28 host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD |
f9ec45d1 29 SDHCI_QUIRK_BROKEN_R1B;
293eb33f
MS
30 host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
31
b8a9bebe 32 add_sdhci(host, CONFIG_ZYNQ_SDHCI_MAX_FREQ, 0);
293eb33f
MS
33 return 0;
34}