]> git.ipfire.org Git - people/ms/u-boot.git/blame - drivers/mmc/zynq_sdhci.c
Add GPL-2.0+ SPDX-License-Identifier to source files
[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>
10#include <malloc.h>
11#include <sdhci.h>
12#include <asm/arch/sys_proto.h>
13
14int zynq_sdhci_init(u32 regbase)
15{
16 struct sdhci_host *host = NULL;
17
18 host = (struct sdhci_host *)malloc(sizeof(struct sdhci_host));
19 if (!host) {
20 printf("zynq_sdhci_init: sdhci_host malloc fail\n");
21 return 1;
22 }
23
24 host->name = "zynq_sdhci";
25 host->ioaddr = (void *)regbase;
26 host->quirks = SDHCI_QUIRK_NO_CD | SDHCI_QUIRK_WAIT_SEND_CMD;
27 host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
28
29 host->host_caps = MMC_MODE_HC;
30
31 add_sdhci(host, 52000000, 52000000 >> 9);
32 return 0;
33}