Lines Matching refs:sprd_host

218 	struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host);  in _sdhci_sprd_set_clock()  local
223 div = sdhci_sprd_calc_div(sprd_host->base_rate, clk); in _sdhci_sprd_set_clock()
292 struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_get_max_clock() local
294 return clk_round_rate(sprd_host->clk_sdio, ULONG_MAX); in sdhci_sprd_get_max_clock()
305 struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_set_uhs_signaling() local
307 u32 *p = sprd_host->phy_delay; in sdhci_sprd_set_uhs_signaling()
414 struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_check_auto_cmd23() local
416 host->flags |= sprd_host->flags & SDHCI_AUTO_CMD23; in sdhci_sprd_check_auto_cmd23()
447 struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_voltage_switch() local
459 if (IS_ERR(sprd_host->pinctrl)) in sdhci_sprd_voltage_switch()
464 ret = pinctrl_select_state(sprd_host->pinctrl, in sdhci_sprd_voltage_switch()
465 sprd_host->pins_uhs); in sdhci_sprd_voltage_switch()
476 ret = pinctrl_select_state(sprd_host->pinctrl, in sdhci_sprd_voltage_switch()
477 sprd_host->pins_default); in sdhci_sprd_voltage_switch()
499 struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_hs400_enhanced_strobe() local
500 u32 *p = sprd_host->phy_delay; in sdhci_sprd_hs400_enhanced_strobe()
521 static void sdhci_sprd_phy_param_parse(struct sdhci_sprd_host *sprd_host, in sdhci_sprd_phy_param_parse() argument
524 u32 *p = sprd_host->phy_delay; in sdhci_sprd_phy_param_parse()
552 struct sdhci_sprd_host *sprd_host; in sdhci_sprd_probe() local
557 host = sdhci_pltfm_init(pdev, &sdhci_sprd_pdata, sizeof(*sprd_host)); in sdhci_sprd_probe()
587 sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_probe()
588 sdhci_sprd_phy_param_parse(sprd_host, pdev->dev.of_node); in sdhci_sprd_probe()
590 sprd_host->pinctrl = devm_pinctrl_get(&pdev->dev); in sdhci_sprd_probe()
591 if (!IS_ERR(sprd_host->pinctrl)) { in sdhci_sprd_probe()
592 sprd_host->pins_uhs = in sdhci_sprd_probe()
593 pinctrl_lookup_state(sprd_host->pinctrl, "state_uhs"); in sdhci_sprd_probe()
594 if (IS_ERR(sprd_host->pins_uhs)) { in sdhci_sprd_probe()
595 ret = PTR_ERR(sprd_host->pins_uhs); in sdhci_sprd_probe()
599 sprd_host->pins_default = in sdhci_sprd_probe()
600 pinctrl_lookup_state(sprd_host->pinctrl, "default"); in sdhci_sprd_probe()
601 if (IS_ERR(sprd_host->pins_default)) { in sdhci_sprd_probe()
602 ret = PTR_ERR(sprd_host->pins_default); in sdhci_sprd_probe()
612 sprd_host->clk_sdio = clk; in sdhci_sprd_probe()
613 sprd_host->base_rate = clk_get_rate(sprd_host->clk_sdio); in sdhci_sprd_probe()
614 if (!sprd_host->base_rate) in sdhci_sprd_probe()
615 sprd_host->base_rate = SDHCI_SPRD_CLK_DEF_RATE; in sdhci_sprd_probe()
622 sprd_host->clk_enable = clk; in sdhci_sprd_probe()
626 sprd_host->clk_2x_enable = clk; in sdhci_sprd_probe()
628 ret = clk_prepare_enable(sprd_host->clk_sdio); in sdhci_sprd_probe()
632 ret = clk_prepare_enable(sprd_host->clk_enable); in sdhci_sprd_probe()
636 ret = clk_prepare_enable(sprd_host->clk_2x_enable); in sdhci_sprd_probe()
642 sprd_host->version = ((host->version & SDHCI_VENDOR_VER_MASK) >> in sdhci_sprd_probe()
668 sprd_host->flags = host->flags; in sdhci_sprd_probe()
697 clk_disable_unprepare(sprd_host->clk_2x_enable); in sdhci_sprd_probe()
700 clk_disable_unprepare(sprd_host->clk_enable); in sdhci_sprd_probe()
703 clk_disable_unprepare(sprd_host->clk_sdio); in sdhci_sprd_probe()
713 struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_remove() local
717 clk_disable_unprepare(sprd_host->clk_sdio); in sdhci_sprd_remove()
718 clk_disable_unprepare(sprd_host->clk_enable); in sdhci_sprd_remove()
719 clk_disable_unprepare(sprd_host->clk_2x_enable); in sdhci_sprd_remove()
736 struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_runtime_suspend() local
741 clk_disable_unprepare(sprd_host->clk_sdio); in sdhci_sprd_runtime_suspend()
742 clk_disable_unprepare(sprd_host->clk_enable); in sdhci_sprd_runtime_suspend()
743 clk_disable_unprepare(sprd_host->clk_2x_enable); in sdhci_sprd_runtime_suspend()
751 struct sdhci_sprd_host *sprd_host = TO_SPRD_HOST(host); in sdhci_sprd_runtime_resume() local
754 ret = clk_prepare_enable(sprd_host->clk_2x_enable); in sdhci_sprd_runtime_resume()
758 ret = clk_prepare_enable(sprd_host->clk_enable); in sdhci_sprd_runtime_resume()
762 ret = clk_prepare_enable(sprd_host->clk_sdio); in sdhci_sprd_runtime_resume()
772 clk_disable_unprepare(sprd_host->clk_enable); in sdhci_sprd_runtime_resume()
775 clk_disable_unprepare(sprd_host->clk_2x_enable); in sdhci_sprd_runtime_resume()