Lines Matching +full:2 +full:- +full:cell

1 // SPDX-License-Identifier: GPL-2.0
3 * Driver for the MMC / SD / SDIO cell found in:
62 divisor = host->pdata->hclk / new_clock; in tmio_mmc_set_clock()
64 /* bit7 set: 1/512, ... bit0 set: 1/4, all bits clear: 1/2 */ in tmio_mmc_set_clock()
66 clk = clk_sel ? 0 : (roundup_pow_of_two(divisor) >> 2); in tmio_mmc_set_clock()
68 host->pdata->set_clk_div(host->pdev, clk_sel); in tmio_mmc_set_clock()
90 const struct mfd_cell *cell = mfd_get_cell(pdev); in tmio_mmc_suspend() local
96 if (!ret && cell->disable) in tmio_mmc_suspend()
97 cell->disable(pdev); in tmio_mmc_suspend()
105 const struct mfd_cell *cell = mfd_get_cell(pdev); in tmio_mmc_resume() local
109 if (cell->resume) in tmio_mmc_resume()
110 ret = cell->resume(pdev); in tmio_mmc_resume()
121 const struct mfd_cell *cell = mfd_get_cell(pdev); in tmio_mmc_probe() local
125 int ret = -EINVAL, irq; in tmio_mmc_probe()
127 if (pdev->num_resources != 2) in tmio_mmc_probe()
130 pdata = pdev->dev.platform_data; in tmio_mmc_probe()
131 if (!pdata || !pdata->hclk) in tmio_mmc_probe()
141 if (cell->enable) { in tmio_mmc_probe()
142 ret = cell->enable(pdev); in tmio_mmc_probe()
149 ret = -EINVAL; in tmio_mmc_probe()
160 host->bus_shift = resource_size(res) >> 10; in tmio_mmc_probe()
161 host->set_clock = tmio_mmc_set_clock; in tmio_mmc_probe()
162 host->reset = tmio_mmc_reset; in tmio_mmc_probe()
164 host->mmc->f_max = pdata->hclk; in tmio_mmc_probe()
165 host->mmc->f_min = pdata->hclk / 512; in tmio_mmc_probe()
171 ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, in tmio_mmc_probe()
173 dev_name(&pdev->dev), host); in tmio_mmc_probe()
177 pr_info("%s at 0x%p irq %d\n", mmc_hostname(host->mmc), host->ctl, irq); in tmio_mmc_probe()
186 if (cell->disable) in tmio_mmc_probe()
187 cell->disable(pdev); in tmio_mmc_probe()
194 const struct mfd_cell *cell = mfd_get_cell(pdev); in tmio_mmc_remove() local
198 if (cell->disable) in tmio_mmc_remove()
199 cell->disable(pdev); in tmio_mmc_remove()
204 /* ------------------- device registration ----------------------- */
214 .name = "tmio-mmc",
227 MODULE_ALIAS("platform:tmio-mmc");