Lines Matching +full:sdhci +full:- +full:caps

2  * Support of SDHCI platform devices for Microchip PIC32.
7 * Inspired by sdhci-pltfm.c
26 #include "sdhci.h"
27 #include "sdhci-pltfm.h"
28 #include <linux/platform_data/sdhci-pic32.h>
55 return clk_get_rate(sdhci_pdata->base_clk); in pic32_sdhci_get_max_clock()
65 if (host->version >= SDHCI_SPEC_300) in pic32_sdhci_set_bus_width()
68 if (host->version >= SDHCI_SPEC_300) in pic32_sdhci_set_bus_width()
109 u32 bus = readl(host->ioaddr + SDH_SHARED_BUS_CTRL); in pic32_sdhci_shared_bus()
121 writel(bus, host->ioaddr + SDH_SHARED_BUS_CTRL); in pic32_sdhci_shared_bus()
131 host->caps = readl(host->ioaddr + SDHCI_CAPABILITIES); in pic32_sdhci_probe_platform()
132 caps_slot_type = (host->caps & SDH_CAPS_SDH_SLOT_TYPE_MASK) >> 30; in pic32_sdhci_probe_platform()
155 plat_data = pdev->dev.platform_data; in pic32_sdhci_probe()
156 if (plat_data && plat_data->setup_dma) { in pic32_sdhci_probe()
157 ret = plat_data->setup_dma(ADMA_FIFO_RD_THSHLD, in pic32_sdhci_probe()
163 sdhci_pdata->sys_clk = devm_clk_get(&pdev->dev, "sys_clk"); in pic32_sdhci_probe()
164 if (IS_ERR(sdhci_pdata->sys_clk)) { in pic32_sdhci_probe()
165 ret = PTR_ERR(sdhci_pdata->sys_clk); in pic32_sdhci_probe()
166 dev_err(&pdev->dev, "Error getting clock\n"); in pic32_sdhci_probe()
170 ret = clk_prepare_enable(sdhci_pdata->sys_clk); in pic32_sdhci_probe()
172 dev_err(&pdev->dev, "Error enabling clock\n"); in pic32_sdhci_probe()
176 sdhci_pdata->base_clk = devm_clk_get(&pdev->dev, "base_clk"); in pic32_sdhci_probe()
177 if (IS_ERR(sdhci_pdata->base_clk)) { in pic32_sdhci_probe()
178 ret = PTR_ERR(sdhci_pdata->base_clk); in pic32_sdhci_probe()
179 dev_err(&pdev->dev, "Error getting clock\n"); in pic32_sdhci_probe()
183 ret = clk_prepare_enable(sdhci_pdata->base_clk); in pic32_sdhci_probe()
185 dev_err(&pdev->dev, "Error enabling clock\n"); in pic32_sdhci_probe()
189 ret = mmc_of_parse(host->mmc); in pic32_sdhci_probe()
199 dev_info(&pdev->dev, "Successfully added sdhci host\n"); in pic32_sdhci_probe()
203 clk_disable_unprepare(sdhci_pdata->base_clk); in pic32_sdhci_probe()
205 clk_disable_unprepare(sdhci_pdata->sys_clk); in pic32_sdhci_probe()
209 dev_err(&pdev->dev, "pic32-sdhci probe failed: %d\n", ret); in pic32_sdhci_probe()
219 scratch = readl(host->ioaddr + SDHCI_INT_STATUS); in pic32_sdhci_remove()
221 clk_disable_unprepare(sdhci_pdata->base_clk); in pic32_sdhci_remove()
222 clk_disable_unprepare(sdhci_pdata->sys_clk); in pic32_sdhci_remove()
227 { .compatible = "microchip,pic32mzda-sdhci" },
234 .name = "pic32-sdhci",
244 MODULE_DESCRIPTION("Microchip PIC32 SDHCI driver");