Lines Matching refs:mmc

266 	struct mmc_host *mmc;  member
334 struct mmc_ios ios = host->mmc->ios; in msm_get_clock_mult_for_bus_mode()
354 struct mmc_ios curr_ios = host->mmc->ios; in msm_set_clock_rate_for_bus_mode()
363 rc = dev_pm_opp_set_rate(mmc_dev(host->mmc), desired_rate); in msm_set_clock_rate_for_bus_mode()
366 mmc_hostname(host->mmc), desired_rate, curr_ios.timing); in msm_set_clock_rate_for_bus_mode()
378 mmc_hostname(host->mmc), desired_rate, achieved_rate); in msm_set_clock_rate_for_bus_mode()
379 host->mmc->actual_clock = achieved_rate / mult; in msm_set_clock_rate_for_bus_mode()
385 mmc_hostname(host->mmc), achieved_rate, curr_ios.timing); in msm_set_clock_rate_for_bus_mode()
393 struct mmc_host *mmc = host->mmc; in msm_dll_poll_ck_out_en() local
403 dev_err(mmc_dev(mmc), "%s: CK_OUT_EN bit is not %d\n", in msm_dll_poll_ck_out_en()
404 mmc_hostname(mmc), poll); in msm_dll_poll_ck_out_en()
425 struct mmc_host *mmc = host->mmc; in msm_config_cm_dll_phase() local
469 dev_err(mmc_dev(mmc), "%s: Failed to set DLL phase: %d\n", in msm_config_cm_dll_phase()
470 mmc_hostname(mmc), phase); in msm_config_cm_dll_phase()
495 struct mmc_host *mmc = host->mmc; in msm_find_most_appropriate_phase() local
498 dev_err(mmc_dev(mmc), "%s: Invalid argument: total_phases=%d\n", in msm_find_most_appropriate_phase()
499 mmc_hostname(mmc), total_phases); in msm_find_most_appropriate_phase()
581 dev_err(mmc_dev(mmc), "%s: Invalid phase selected=%d\n", in msm_find_most_appropriate_phase()
582 mmc_hostname(mmc), ret); in msm_find_most_appropriate_phase()
621 struct mmc_host *mmc = host->mmc; in msm_init_cm_dll() local
762 dev_err(mmc_dev(mmc), "%s: DLL failed to LOCK\n", in msm_init_cm_dll()
763 mmc_hostname(mmc)); in msm_init_cm_dll()
818 struct mmc_ios ios = host->mmc->ios; in msm_hc_select_hs400()
858 mmc_hostname(host->mmc), dll_lock); in msm_hc_select_hs400()
887 struct mmc_ios ios = host->mmc->ios; in sdhci_msm_hc_select_mode()
905 pr_debug("%s: %s: Enter\n", mmc_hostname(host->mmc), __func__); in sdhci_msm_cdclp533_calibration()
977 mmc_hostname(host->mmc), __func__); in sdhci_msm_cdclp533_calibration()
985 mmc_hostname(host->mmc), __func__, ret); in sdhci_msm_cdclp533_calibration()
994 pr_debug("%s: %s: Exit, ret %d\n", mmc_hostname(host->mmc), in sdhci_msm_cdclp533_calibration()
1001 struct mmc_host *mmc = host->mmc; in sdhci_msm_cm_dll_sdc4_calibration() local
1009 pr_debug("%s: %s: Enter\n", mmc_hostname(host->mmc), __func__); in sdhci_msm_cm_dll_sdc4_calibration()
1024 if (mmc->ios.enhanced_strobe) { in sdhci_msm_cm_dll_sdc4_calibration()
1044 mmc_hostname(host->mmc), __func__); in sdhci_msm_cm_dll_sdc4_calibration()
1070 pr_debug("%s: %s: Exit, ret %d\n", mmc_hostname(host->mmc), in sdhci_msm_cm_dll_sdc4_calibration()
1079 struct mmc_host *mmc = host->mmc; in sdhci_msm_hs400_dll_calibration() local
1085 pr_debug("%s: %s: Enter\n", mmc_hostname(host->mmc), __func__); in sdhci_msm_hs400_dll_calibration()
1095 if (!mmc->ios.enhanced_strobe) { in sdhci_msm_hs400_dll_calibration()
1113 pr_debug("%s: %s: Exit, ret %d\n", mmc_hostname(host->mmc), in sdhci_msm_hs400_dll_calibration()
1120 struct mmc_ios *ios = &host->mmc->ios; in sdhci_msm_is_tuning_needed()
1181 static int sdhci_msm_execute_tuning(struct mmc_host *mmc, u32 opcode) in sdhci_msm_execute_tuning() argument
1183 struct sdhci_host *host = mmc_priv(mmc); in sdhci_msm_execute_tuning()
1187 struct mmc_ios ios = host->mmc->ios; in sdhci_msm_execute_tuning()
1230 rc = mmc_send_tuning(mmc, opcode, NULL); in sdhci_msm_execute_tuning()
1234 dev_dbg(mmc_dev(mmc), "%s: Found good phase = %d\n", in sdhci_msm_execute_tuning()
1235 mmc_hostname(mmc), phase); in sdhci_msm_execute_tuning()
1248 dev_dbg(mmc_dev(mmc), "%s: All phases valid; try again\n", in sdhci_msm_execute_tuning()
1249 mmc_hostname(mmc)); in sdhci_msm_execute_tuning()
1271 dev_dbg(mmc_dev(mmc), "%s: Setting the tuning phase to %d\n", in sdhci_msm_execute_tuning()
1272 mmc_hostname(mmc), phase); in sdhci_msm_execute_tuning()
1277 dev_dbg(mmc_dev(mmc), "%s: No tuning point found\n", in sdhci_msm_execute_tuning()
1278 mmc_hostname(mmc)); in sdhci_msm_execute_tuning()
1307 mmc_hostname(host->mmc), ret); in sdhci_msm_hs400()
1314 struct mmc_host *mmc = host->mmc; in sdhci_msm_set_uhs_signaling() local
1380 dev_dbg(mmc_dev(mmc), "%s: clock=%u uhs=%u ctrl_2=0x%x\n", in sdhci_msm_set_uhs_signaling()
1381 mmc_hostname(host->mmc), host->clock, uhs, ctrl_2); in sdhci_msm_set_uhs_signaling()
1384 if (mmc->ios.timing == MMC_TIMING_MMC_HS400) in sdhci_msm_set_uhs_signaling()
1385 sdhci_msm_hs400(host, &mmc->ios); in sdhci_msm_set_uhs_signaling()
1401 static int sdhci_msm_set_vmmc(struct mmc_host *mmc) in sdhci_msm_set_vmmc() argument
1403 if (IS_ERR(mmc->supply.vmmc)) in sdhci_msm_set_vmmc()
1406 return mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, mmc->ios.vdd); in sdhci_msm_set_vmmc()
1410 struct mmc_host *mmc, bool level) in msm_toggle_vqmmc() argument
1426 ret = mmc_regulator_set_vqmmc(mmc, &ios); in msm_toggle_vqmmc()
1428 dev_err(mmc_dev(mmc), "%s: vqmmc set volgate failed: %d\n", in msm_toggle_vqmmc()
1429 mmc_hostname(mmc), ret); in msm_toggle_vqmmc()
1433 ret = regulator_enable(mmc->supply.vqmmc); in msm_toggle_vqmmc()
1435 ret = regulator_disable(mmc->supply.vqmmc); in msm_toggle_vqmmc()
1439 dev_err(mmc_dev(mmc), "%s: vqmm %sable failed: %d\n", in msm_toggle_vqmmc()
1440 mmc_hostname(mmc), level ? "en":"dis", ret); in msm_toggle_vqmmc()
1448 struct mmc_host *mmc, bool hpm) in msm_config_vqmmc_mode() argument
1453 ret = regulator_set_load(mmc->supply.vqmmc, load); in msm_config_vqmmc_mode()
1455 dev_err(mmc_dev(mmc), "%s: vqmmc set load failed: %d\n", in msm_config_vqmmc_mode()
1456 mmc_hostname(mmc), ret); in msm_config_vqmmc_mode()
1461 struct mmc_host *mmc, bool level) in sdhci_msm_set_vqmmc() argument
1466 if (IS_ERR(mmc->supply.vqmmc) || in sdhci_msm_set_vqmmc()
1467 (mmc->ios.power_mode == MMC_POWER_UNDEFINED)) in sdhci_msm_set_vqmmc()
1479 always_on = !mmc_card_is_removable(mmc) && in sdhci_msm_set_vqmmc()
1480 mmc->card && mmc_card_mmc(mmc->card); in sdhci_msm_set_vqmmc()
1483 ret = msm_config_vqmmc_mode(msm_host, mmc, level); in sdhci_msm_set_vqmmc()
1485 ret = msm_toggle_vqmmc(msm_host, mmc, level); in sdhci_msm_set_vqmmc()
1520 mmc_hostname(host->mmc), __func__, req_type, in sdhci_msm_check_power_status()
1551 mmc_hostname(host->mmc), req_type); in sdhci_msm_check_power_status()
1569 mmc_hostname(host->mmc), req_type); in sdhci_msm_check_power_status()
1571 pr_debug("%s: %s: request %d done\n", mmc_hostname(host->mmc), in sdhci_msm_check_power_status()
1583 mmc_hostname(host->mmc), in sdhci_msm_dump_pwr_ctrl_regs()
1593 struct mmc_host *mmc = host->mmc; in sdhci_msm_handle_pwr_irq() local
1618 mmc_hostname(host->mmc), irq_status); in sdhci_msm_handle_pwr_irq()
1640 ret = sdhci_msm_set_vmmc(mmc); in sdhci_msm_handle_pwr_irq()
1642 ret = sdhci_msm_set_vqmmc(msm_host, mmc, in sdhci_msm_handle_pwr_irq()
1663 if (io_level && !IS_ERR(mmc->supply.vqmmc) && !pwr_state) { in sdhci_msm_handle_pwr_irq()
1664 ret = mmc_regulator_set_vqmmc(mmc, &mmc->ios); in sdhci_msm_handle_pwr_irq()
1666 …dev_err(mmc_dev(mmc), "%s: IO_level setting failed(%d). signal_voltage: %d, vdd: %d irq_status: 0x… in sdhci_msm_handle_pwr_irq()
1667 mmc_hostname(mmc), ret, in sdhci_msm_handle_pwr_irq()
1668 mmc->ios.signal_voltage, mmc->ios.vdd, in sdhci_msm_handle_pwr_irq()
1720 dev_dbg(mmc_dev(mmc), "%s: %s: Handled IRQ(%d), irq_status=0x%x, ack=0x%x\n", in sdhci_msm_handle_pwr_irq()
1721 mmc_hostname(msm_host->mmc), __func__, irq, irq_status, in sdhci_msm_handle_pwr_irq()
1786 host->mmc->actual_clock = msm_host->clk_rate = 0; in sdhci_msm_set_clock()
1828 struct device *dev = mmc_dev(msm_host->mmc); in sdhci_msm_ice_supported()
1863 struct mmc_host *mmc = msm_host->mmc; in sdhci_msm_ice_init() local
1864 struct device *dev = mmc_dev(mmc); in sdhci_msm_ice_init()
1889 mmc->caps2 |= MMC_CAP2_CRYPTO; in sdhci_msm_ice_init()
1944 dev_err(mmc_dev(msm_host->mmc), in sdhci_msm_ice_wait_bist_status()
1951 if (!(msm_host->mmc->caps2 & MMC_CAP2_CRYPTO)) in sdhci_msm_ice_enable()
1960 if (!(msm_host->mmc->caps2 & MMC_CAP2_CRYPTO)) in sdhci_msm_ice_resume()
1973 struct device *dev = mmc_dev(cq_host->mmc); in sdhci_msm_program_key()
2047 cqhci_irq(host->mmc, intmask, cmd_error, data_error); in sdhci_msm_cqe_irq()
2051 static void sdhci_msm_cqe_enable(struct mmc_host *mmc) in sdhci_msm_cqe_enable() argument
2053 struct sdhci_host *host = mmc_priv(mmc); in sdhci_msm_cqe_enable()
2057 sdhci_cqe_enable(mmc); in sdhci_msm_cqe_enable()
2061 static void sdhci_msm_cqe_disable(struct mmc_host *mmc, bool recovery) in sdhci_msm_cqe_disable() argument
2063 struct sdhci_host *host = mmc_priv(mmc); in sdhci_msm_cqe_disable()
2089 sdhci_cqe_disable(mmc, recovery); in sdhci_msm_cqe_disable()
2145 msm_host->mmc->caps2 |= MMC_CAP2_CQE | MMC_CAP2_CQE_DCMD; in sdhci_msm_cqe_add_host()
2154 ret = cqhci_init(cq_host, host->mmc, dma64); in sdhci_msm_cqe_add_host()
2157 mmc_hostname(host->mmc), ret); in sdhci_msm_cqe_add_host()
2180 mmc_hostname(host->mmc)); in sdhci_msm_cqe_add_host()
2266 struct mmc_host *mmc = msm_host->mmc; in sdhci_msm_set_regulator_caps() local
2267 struct regulator *supply = mmc->supply.vqmmc; in sdhci_msm_set_regulator_caps()
2269 struct sdhci_host *host = mmc_priv(mmc); in sdhci_msm_set_regulator_caps()
2272 if (!IS_ERR(mmc->supply.vqmmc)) { in sdhci_msm_set_regulator_caps()
2280 mmc_hostname(mmc)); in sdhci_msm_set_regulator_caps()
2303 pr_debug("%s: supported caps: 0x%08x\n", mmc_hostname(mmc), caps); in sdhci_msm_set_regulator_caps()
2308 if ((host->mmc->caps2 & MMC_CAP2_CQE) && (mask & SDHCI_RESET_ALL)) in sdhci_msm_reset()
2309 cqhci_deactivate(host->mmc); in sdhci_msm_reset()
2317 ret = mmc_regulator_get_supply(msm_host->mmc); in sdhci_msm_register_vreg()
2326 static int sdhci_msm_start_signal_voltage_switch(struct mmc_host *mmc, in sdhci_msm_start_signal_voltage_switch() argument
2329 struct sdhci_host *host = mmc_priv(mmc); in sdhci_msm_start_signal_voltage_switch()
2372 dev_warn(mmc_dev(mmc), "%s: Regulator output did not became stable\n", in sdhci_msm_start_signal_voltage_switch()
2373 mmc_hostname(mmc)); in sdhci_msm_start_signal_voltage_switch()
2380 pr_err("%s: " DRIVER_NAME ": " f, mmc_hostname(host->mmc), ## x)
2507 msm_host->mmc = host->mmc; in sdhci_msm_probe()
2510 ret = mmc_of_parse(host->mmc); in sdhci_msm_probe()
2715 msm_host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_NEED_RSP_BUSY; in sdhci_msm_probe()