| * Copyright (C) 2015 Atmel Corporation |
| * Wenyou.Yang <wenyou.yang@atmel.com> |
| * SPDX-License-Identifier: GPL-2.0+ |
| #include <asm/arch/clk.h> |
| #define ATMEL_SDHC_MIN_FREQ 400000 |
| int atmel_sdhci_init(void *regbase, u32 id) |
| u32 max_clk, min_clk = ATMEL_SDHC_MIN_FREQ; |
| host = (struct sdhci_host *)calloc(1, sizeof(struct sdhci_host)); |
| printf("%s: sdhci_host calloc failed\n", __func__); |
| host->name = "atmel_sdhci"; |
| host->version = sdhci_readw(host, SDHCI_HOST_VERSION); |
| max_clk = at91_get_periph_generated_clk(id); |
| printf("%s: Failed to get the proper clock\n", __func__); |
| add_sdhci(host, max_clk, min_clk); |