Lines Matching refs:sprd_host

217 	struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host);  in _sdhci_sprd_set_clock()  local
222 div = sdhci_sprd_calc_div(sprd_host->base_rate, clk); in _sdhci_sprd_set_clock()
291 struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_get_max_clock() local
293 return clk_round_rate(sprd_host->clk_sdio, ULONG_MAX); in sdhci_sprd_get_max_clock()
304 struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_set_uhs_signaling() local
306 u32 *p = sprd_host->phy_delay; in sdhci_sprd_set_uhs_signaling()
400 struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_request() local
402 host->flags |= sprd_host->flags & SDHCI_AUTO_CMD23; in sdhci_sprd_request()
420 struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_voltage_switch() local
432 if (IS_ERR(sprd_host->pinctrl)) in sdhci_sprd_voltage_switch()
437 ret = pinctrl_select_state(sprd_host->pinctrl, in sdhci_sprd_voltage_switch()
438 sprd_host->pins_uhs); in sdhci_sprd_voltage_switch()
449 ret = pinctrl_select_state(sprd_host->pinctrl, in sdhci_sprd_voltage_switch()
450 sprd_host->pins_default); in sdhci_sprd_voltage_switch()
470 struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_hs400_enhanced_strobe() local
471 u32 *p = sprd_host->phy_delay; in sdhci_sprd_hs400_enhanced_strobe()
492 static void sdhci_sprd_phy_param_parse(struct sdhci_sprd_host *sprd_host, in sdhci_sprd_phy_param_parse() argument
495 u32 *p = sprd_host->phy_delay; in sdhci_sprd_phy_param_parse()
523 struct sdhci_sprd_host *sprd_host; in sdhci_sprd_probe() local
527 host = sdhci_pltfm_init(pdev, &sdhci_sprd_pdata, sizeof(*sprd_host)); in sdhci_sprd_probe()
551 sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_probe()
552 sdhci_sprd_phy_param_parse(sprd_host, pdev->dev.of_node); in sdhci_sprd_probe()
554 sprd_host->pinctrl = devm_pinctrl_get(&pdev->dev); in sdhci_sprd_probe()
555 if (!IS_ERR(sprd_host->pinctrl)) { in sdhci_sprd_probe()
556 sprd_host->pins_uhs = in sdhci_sprd_probe()
557 pinctrl_lookup_state(sprd_host->pinctrl, "state_uhs"); in sdhci_sprd_probe()
558 if (IS_ERR(sprd_host->pins_uhs)) { in sdhci_sprd_probe()
559 ret = PTR_ERR(sprd_host->pins_uhs); in sdhci_sprd_probe()
563 sprd_host->pins_default = in sdhci_sprd_probe()
564 pinctrl_lookup_state(sprd_host->pinctrl, "default"); in sdhci_sprd_probe()
565 if (IS_ERR(sprd_host->pins_default)) { in sdhci_sprd_probe()
566 ret = PTR_ERR(sprd_host->pins_default); in sdhci_sprd_probe()
576 sprd_host->clk_sdio = clk; in sdhci_sprd_probe()
577 sprd_host->base_rate = clk_get_rate(sprd_host->clk_sdio); in sdhci_sprd_probe()
578 if (!sprd_host->base_rate) in sdhci_sprd_probe()
579 sprd_host->base_rate = SDHCI_SPRD_CLK_DEF_RATE; in sdhci_sprd_probe()
586 sprd_host->clk_enable = clk; in sdhci_sprd_probe()
590 sprd_host->clk_2x_enable = clk; in sdhci_sprd_probe()
592 ret = clk_prepare_enable(sprd_host->clk_sdio); in sdhci_sprd_probe()
596 ret = clk_prepare_enable(sprd_host->clk_enable); in sdhci_sprd_probe()
600 ret = clk_prepare_enable(sprd_host->clk_2x_enable); in sdhci_sprd_probe()
606 sprd_host->version = ((host->version & SDHCI_VENDOR_VER_MASK) >> in sdhci_sprd_probe()
632 sprd_host->flags = host->flags; in sdhci_sprd_probe()
651 clk_disable_unprepare(sprd_host->clk_2x_enable); in sdhci_sprd_probe()
654 clk_disable_unprepare(sprd_host->clk_enable); in sdhci_sprd_probe()
657 clk_disable_unprepare(sprd_host->clk_sdio); in sdhci_sprd_probe()
667 struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_remove() local
671 clk_disable_unprepare(sprd_host->clk_sdio); in sdhci_sprd_remove()
672 clk_disable_unprepare(sprd_host->clk_enable); in sdhci_sprd_remove()
673 clk_disable_unprepare(sprd_host->clk_2x_enable); in sdhci_sprd_remove()
690 struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_runtime_suspend() local
694 clk_disable_unprepare(sprd_host->clk_sdio); in sdhci_sprd_runtime_suspend()
695 clk_disable_unprepare(sprd_host->clk_enable); in sdhci_sprd_runtime_suspend()
696 clk_disable_unprepare(sprd_host->clk_2x_enable); in sdhci_sprd_runtime_suspend()
704 struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_runtime_resume() local
707 ret = clk_prepare_enable(sprd_host->clk_2x_enable); in sdhci_sprd_runtime_resume()
711 ret = clk_prepare_enable(sprd_host->clk_enable); in sdhci_sprd_runtime_resume()
715 ret = clk_prepare_enable(sprd_host->clk_sdio); in sdhci_sprd_runtime_resume()
723 clk_disable_unprepare(sprd_host->clk_enable); in sdhci_sprd_runtime_resume()
726 clk_disable_unprepare(sprd_host->clk_2x_enable); in sdhci_sprd_runtime_resume()