Lines Matching refs:hba
60 static bool ufs_mtk_is_boost_crypt_enabled(struct ufs_hba *hba) in ufs_mtk_is_boost_crypt_enabled() argument
62 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_is_boost_crypt_enabled()
67 static bool ufs_mtk_is_va09_supported(struct ufs_hba *hba) in ufs_mtk_is_va09_supported() argument
69 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_is_va09_supported()
74 static bool ufs_mtk_is_broken_vcc(struct ufs_hba *hba) in ufs_mtk_is_broken_vcc() argument
76 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_is_broken_vcc()
81 static void ufs_mtk_cfg_unipro_cg(struct ufs_hba *hba, bool enable) in ufs_mtk_cfg_unipro_cg() argument
86 ufshcd_dme_get(hba, in ufs_mtk_cfg_unipro_cg()
92 ufshcd_dme_set(hba, in ufs_mtk_cfg_unipro_cg()
95 ufshcd_dme_get(hba, in ufs_mtk_cfg_unipro_cg()
98 ufshcd_dme_set(hba, in ufs_mtk_cfg_unipro_cg()
101 ufshcd_dme_get(hba, in ufs_mtk_cfg_unipro_cg()
106 ufshcd_dme_set(hba, in ufs_mtk_cfg_unipro_cg()
109 ufshcd_dme_get(hba, in ufs_mtk_cfg_unipro_cg()
112 ufshcd_dme_set(hba, in ufs_mtk_cfg_unipro_cg()
117 static void ufs_mtk_crypto_enable(struct ufs_hba *hba) in ufs_mtk_crypto_enable() argument
123 dev_info(hba->dev, "%s: crypto enable failed, err: %lu\n", in ufs_mtk_crypto_enable()
125 hba->caps &= ~UFSHCD_CAP_CRYPTO; in ufs_mtk_crypto_enable()
129 static void ufs_mtk_host_reset(struct ufs_hba *hba) in ufs_mtk_host_reset() argument
131 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_host_reset()
144 static void ufs_mtk_init_reset_control(struct ufs_hba *hba, in ufs_mtk_init_reset_control() argument
148 *rc = devm_reset_control_get(hba->dev, str); in ufs_mtk_init_reset_control()
150 dev_info(hba->dev, "Failed to get reset control %s: %ld\n", in ufs_mtk_init_reset_control()
156 static void ufs_mtk_init_reset(struct ufs_hba *hba) in ufs_mtk_init_reset() argument
158 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_init_reset()
160 ufs_mtk_init_reset_control(hba, &host->hci_reset, in ufs_mtk_init_reset()
162 ufs_mtk_init_reset_control(hba, &host->unipro_reset, in ufs_mtk_init_reset()
164 ufs_mtk_init_reset_control(hba, &host->crypto_reset, in ufs_mtk_init_reset()
168 static int ufs_mtk_hce_enable_notify(struct ufs_hba *hba, in ufs_mtk_hce_enable_notify() argument
171 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_hce_enable_notify()
176 hba->vps->hba_enable_delay_us = 0; in ufs_mtk_hce_enable_notify()
178 hba->vps->hba_enable_delay_us = 600; in ufs_mtk_hce_enable_notify()
179 ufs_mtk_host_reset(hba); in ufs_mtk_hce_enable_notify()
182 if (hba->caps & UFSHCD_CAP_CRYPTO) in ufs_mtk_hce_enable_notify()
183 ufs_mtk_crypto_enable(hba); in ufs_mtk_hce_enable_notify()
186 spin_lock_irqsave(hba->host->host_lock, flags); in ufs_mtk_hce_enable_notify()
187 ufshcd_writel(hba, 0, in ufs_mtk_hce_enable_notify()
189 spin_unlock_irqrestore(hba->host->host_lock, in ufs_mtk_hce_enable_notify()
192 hba->capabilities &= ~MASK_AUTO_HIBERN8_SUPPORT; in ufs_mtk_hce_enable_notify()
193 hba->ahit = 0; in ufs_mtk_hce_enable_notify()
200 static int ufs_mtk_bind_mphy(struct ufs_hba *hba) in ufs_mtk_bind_mphy() argument
202 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_bind_mphy()
203 struct device *dev = hba->dev; in ufs_mtk_bind_mphy()
238 static int ufs_mtk_setup_ref_clk(struct ufs_hba *hba, bool on) in ufs_mtk_setup_ref_clk() argument
240 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_setup_ref_clk()
250 ufshcd_writel(hba, REFCLK_REQUEST, REG_UFS_REFCLK_CTRL); in ufs_mtk_setup_ref_clk()
253 ufshcd_writel(hba, REFCLK_RELEASE, REG_UFS_REFCLK_CTRL); in ufs_mtk_setup_ref_clk()
260 value = ufshcd_readl(hba, REG_UFS_REFCLK_CTRL); in ufs_mtk_setup_ref_clk()
269 dev_err(hba->dev, "missing ack of refclk req, reg: 0x%x\n", value); in ufs_mtk_setup_ref_clk()
285 static void ufs_mtk_setup_ref_clk_wait_us(struct ufs_hba *hba, in ufs_mtk_setup_ref_clk_wait_us() argument
288 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_setup_ref_clk_wait_us()
290 if (hba->dev_info.clk_gating_wait_us) { in ufs_mtk_setup_ref_clk_wait_us()
292 hba->dev_info.clk_gating_wait_us; in ufs_mtk_setup_ref_clk_wait_us()
300 static void ufs_mtk_dbg_sel(struct ufs_hba *hba) in ufs_mtk_dbg_sel() argument
302 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_dbg_sel()
305 ufshcd_writel(hba, 0x820820, REG_UFS_DEBUG_SEL); in ufs_mtk_dbg_sel()
306 ufshcd_writel(hba, 0x0, REG_UFS_DEBUG_SEL_B0); in ufs_mtk_dbg_sel()
307 ufshcd_writel(hba, 0x55555555, REG_UFS_DEBUG_SEL_B1); in ufs_mtk_dbg_sel()
308 ufshcd_writel(hba, 0xaaaaaaaa, REG_UFS_DEBUG_SEL_B2); in ufs_mtk_dbg_sel()
309 ufshcd_writel(hba, 0xffffffff, REG_UFS_DEBUG_SEL_B3); in ufs_mtk_dbg_sel()
311 ufshcd_writel(hba, 0x20, REG_UFS_DEBUG_SEL); in ufs_mtk_dbg_sel()
315 static void ufs_mtk_wait_idle_state(struct ufs_hba *hba, in ufs_mtk_wait_idle_state() argument
331 ufs_mtk_dbg_sel(hba); in ufs_mtk_wait_idle_state()
332 val = ufshcd_readl(hba, REG_UFS_PROBE); in ufs_mtk_wait_idle_state()
352 dev_info(hba->dev, "wait idle tmo: 0x%x\n", val); in ufs_mtk_wait_idle_state()
355 static int ufs_mtk_wait_link_state(struct ufs_hba *hba, u32 state, in ufs_mtk_wait_link_state() argument
364 ufs_mtk_dbg_sel(hba); in ufs_mtk_wait_link_state()
365 val = ufshcd_readl(hba, REG_UFS_PROBE); in ufs_mtk_wait_link_state()
381 static int ufs_mtk_mphy_power_on(struct ufs_hba *hba, bool on) in ufs_mtk_mphy_power_on() argument
383 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_mphy_power_on()
392 if (ufs_mtk_is_va09_supported(hba)) { in ufs_mtk_mphy_power_on()
403 if (ufs_mtk_is_va09_supported(hba)) { in ufs_mtk_mphy_power_on()
412 dev_info(hba->dev, in ufs_mtk_mphy_power_on()
438 static void ufs_mtk_boost_crypt(struct ufs_hba *hba, bool boost) in ufs_mtk_boost_crypt() argument
440 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_boost_crypt()
445 if (!ufs_mtk_is_boost_crypt_enabled(hba)) in ufs_mtk_boost_crypt()
454 dev_info(hba->dev, "clk_prepare_enable(): %d\n", in ufs_mtk_boost_crypt()
462 dev_info(hba->dev, in ufs_mtk_boost_crypt()
470 dev_info(hba->dev, in ufs_mtk_boost_crypt()
479 dev_info(hba->dev, in ufs_mtk_boost_crypt()
486 dev_info(hba->dev, in ufs_mtk_boost_crypt()
494 static int ufs_mtk_init_host_clk(struct ufs_hba *hba, const char *name, in ufs_mtk_init_host_clk() argument
499 ret = ufs_mtk_get_host_clk(hba->dev, name, clk); in ufs_mtk_init_host_clk()
501 dev_info(hba->dev, "%s: failed to get %s: %d", __func__, in ufs_mtk_init_host_clk()
508 static void ufs_mtk_init_boost_crypt(struct ufs_hba *hba) in ufs_mtk_init_boost_crypt() argument
510 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_init_boost_crypt()
512 struct device *dev = hba->dev; in ufs_mtk_init_boost_crypt()
535 if (ufs_mtk_init_host_clk(hba, "crypt_mux", in ufs_mtk_init_boost_crypt()
539 if (ufs_mtk_init_host_clk(hba, "crypt_lp", in ufs_mtk_init_boost_crypt()
543 if (ufs_mtk_init_host_clk(hba, "crypt_perf", in ufs_mtk_init_boost_crypt()
555 static void ufs_mtk_init_va09_pwr_ctrl(struct ufs_hba *hba) in ufs_mtk_init_va09_pwr_ctrl() argument
557 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_init_va09_pwr_ctrl()
559 host->reg_va09 = regulator_get(hba->dev, "va09"); in ufs_mtk_init_va09_pwr_ctrl()
561 dev_info(hba->dev, "failed to get va09"); in ufs_mtk_init_va09_pwr_ctrl()
566 static void ufs_mtk_init_host_caps(struct ufs_hba *hba) in ufs_mtk_init_host_caps() argument
568 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_init_host_caps()
569 struct device_node *np = hba->dev->of_node; in ufs_mtk_init_host_caps()
572 ufs_mtk_init_boost_crypt(hba); in ufs_mtk_init_host_caps()
575 ufs_mtk_init_va09_pwr_ctrl(hba); in ufs_mtk_init_host_caps()
583 dev_info(hba->dev, "caps: 0x%x", host->caps); in ufs_mtk_init_host_caps()
586 static void ufs_mtk_scale_perf(struct ufs_hba *hba, bool up) in ufs_mtk_scale_perf() argument
588 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_scale_perf()
590 ufs_mtk_boost_crypt(hba, up); in ufs_mtk_scale_perf()
591 ufs_mtk_setup_ref_clk(hba, up); in ufs_mtk_scale_perf()
607 static int ufs_mtk_setup_clocks(struct ufs_hba *hba, bool on, in ufs_mtk_setup_clocks() argument
610 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_setup_clocks()
623 if (ufshcd_is_link_off(hba)) { in ufs_mtk_setup_clocks()
625 } else if (ufshcd_is_link_hibern8(hba) || in ufs_mtk_setup_clocks()
626 (!ufshcd_can_hibern8_during_gating(hba) && in ufs_mtk_setup_clocks()
627 ufshcd_is_auto_hibern8_enabled(hba))) { in ufs_mtk_setup_clocks()
633 ret = ufs_mtk_wait_link_state(hba, in ufs_mtk_setup_clocks()
641 ufs_mtk_scale_perf(hba, false); in ufs_mtk_setup_clocks()
643 ufs_mtk_scale_perf(hba, true); in ufs_mtk_setup_clocks()
649 static void ufs_mtk_get_controller_version(struct ufs_hba *hba) in ufs_mtk_get_controller_version() argument
651 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_get_controller_version()
660 ret = ufshcd_dme_get(hba, UIC_ARG_MIB(PA_LOCALVERINFO), &ver); in ufs_mtk_get_controller_version()
668 if (hba->ufs_version < ufshci_version(3, 0)) in ufs_mtk_get_controller_version()
669 hba->ufs_version = ufshci_version(3, 0); in ufs_mtk_get_controller_version()
674 static u32 ufs_mtk_get_ufs_hci_version(struct ufs_hba *hba) in ufs_mtk_get_ufs_hci_version() argument
676 return hba->ufs_version; in ufs_mtk_get_ufs_hci_version()
689 static int ufs_mtk_init(struct ufs_hba *hba) in ufs_mtk_init() argument
692 struct device *dev = hba->dev; in ufs_mtk_init()
703 host->hba = hba; in ufs_mtk_init()
704 ufshcd_set_variant(hba, host); in ufs_mtk_init()
713 ufs_mtk_init_host_caps(hba); in ufs_mtk_init()
715 err = ufs_mtk_bind_mphy(hba); in ufs_mtk_init()
719 ufs_mtk_init_reset(hba); in ufs_mtk_init()
722 hba->caps |= UFSHCD_CAP_RPM_AUTOSUSPEND; in ufs_mtk_init()
725 hba->caps |= UFSHCD_CAP_CLK_GATING; in ufs_mtk_init()
728 hba->caps |= UFSHCD_CAP_CRYPTO; in ufs_mtk_init()
731 hba->caps |= UFSHCD_CAP_WB_EN; in ufs_mtk_init()
732 hba->quirks |= UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL; in ufs_mtk_init()
733 hba->vps->wb_flush_threshold = UFS_WB_BUF_REMAIN_PERCENT(80); in ufs_mtk_init()
736 hba->caps |= UFSHCD_CAP_HIBERN8_WITH_CLK_GATING; in ufs_mtk_init()
745 ufs_mtk_mphy_power_on(hba, true); in ufs_mtk_init()
746 ufs_mtk_setup_clocks(hba, true, POST_CHANGE); in ufs_mtk_init()
748 host->ip_ver = ufshcd_readl(hba, REG_UFS_MTK_IP_VER); in ufs_mtk_init()
753 ufshcd_set_variant(hba, NULL); in ufs_mtk_init()
758 static int ufs_mtk_pre_pwr_change(struct ufs_hba *hba, in ufs_mtk_pre_pwr_change() argument
762 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_pre_pwr_change()
779 ret = ufshcd_dme_configure_adapt(hba, in ufs_mtk_pre_pwr_change()
787 static int ufs_mtk_pwr_change_notify(struct ufs_hba *hba, in ufs_mtk_pwr_change_notify() argument
796 ret = ufs_mtk_pre_pwr_change(hba, dev_max_params, in ufs_mtk_pwr_change_notify()
809 static int ufs_mtk_unipro_set_lpm(struct ufs_hba *hba, bool lpm) in ufs_mtk_unipro_set_lpm() argument
812 struct ufs_mtk_host *host = ufshcd_get_variant(hba); in ufs_mtk_unipro_set_lpm()
814 ret = ufshcd_dme_set(hba, in ufs_mtk_unipro_set_lpm()
829 static int ufs_mtk_pre_link(struct ufs_hba *hba) in ufs_mtk_pre_link() argument
834 ufs_mtk_get_controller_version(hba); in ufs_mtk_pre_link()
836 ret = ufs_mtk_unipro_set_lpm(hba, false); in ufs_mtk_pre_link()
845 ret = ufshcd_disable_host_tx_lcc(hba); in ufs_mtk_pre_link()
850 ret = ufshcd_dme_get(hba, UIC_ARG_MIB(VS_SAVEPOWERCONTROL), &tmp); in ufs_mtk_pre_link()
856 ret = ufshcd_dme_set(hba, UIC_ARG_MIB(VS_SAVEPOWERCONTROL), tmp); in ufs_mtk_pre_link()
861 static void ufs_mtk_setup_clk_gating(struct ufs_hba *hba) in ufs_mtk_setup_clk_gating() argument
866 if (ufshcd_is_clkgating_allowed(hba)) { in ufs_mtk_setup_clk_gating()
867 if (ufshcd_is_auto_hibern8_supported(hba) && hba->ahit) in ufs_mtk_setup_clk_gating()
869 hba->ahit); in ufs_mtk_setup_clk_gating()
872 spin_lock_irqsave(hba->host->host_lock, flags); in ufs_mtk_setup_clk_gating()
873 hba->clk_gating.delay_ms = ah_ms + 5; in ufs_mtk_setup_clk_gating()
874 spin_unlock_irqrestore(hba->host->host_lock, flags); in ufs_mtk_setup_clk_gating()
878 static int ufs_mtk_post_link(struct ufs_hba *hba) in ufs_mtk_post_link() argument
881 ufs_mtk_cfg_unipro_cg(hba, true); in ufs_mtk_post_link()
884 if (ufshcd_is_auto_hibern8_supported(hba)) in ufs_mtk_post_link()
885 hba->ahit = FIELD_PREP(UFSHCI_AHIBERN8_TIMER_MASK, 10) | in ufs_mtk_post_link()
888 ufs_mtk_setup_clk_gating(hba); in ufs_mtk_post_link()
893 static int ufs_mtk_link_startup_notify(struct ufs_hba *hba, in ufs_mtk_link_startup_notify() argument
900 ret = ufs_mtk_pre_link(hba); in ufs_mtk_link_startup_notify()
903 ret = ufs_mtk_post_link(hba); in ufs_mtk_link_startup_notify()
913 static int ufs_mtk_device_reset(struct ufs_hba *hba) in ufs_mtk_device_reset() argument
918 ufshcd_hba_stop(hba); in ufs_mtk_device_reset()
936 dev_info(hba->dev, "device reset done\n"); in ufs_mtk_device_reset()
941 static int ufs_mtk_link_set_hpm(struct ufs_hba *hba) in ufs_mtk_link_set_hpm() argument
945 err = ufshcd_hba_enable(hba); in ufs_mtk_link_set_hpm()
949 err = ufs_mtk_unipro_set_lpm(hba, false); in ufs_mtk_link_set_hpm()
953 err = ufshcd_uic_hibern8_exit(hba); in ufs_mtk_link_set_hpm()
955 ufshcd_set_link_active(hba); in ufs_mtk_link_set_hpm()
959 err = ufshcd_make_hba_operational(hba); in ufs_mtk_link_set_hpm()
966 static int ufs_mtk_link_set_lpm(struct ufs_hba *hba) in ufs_mtk_link_set_lpm() argument
970 err = ufs_mtk_unipro_set_lpm(hba, true); in ufs_mtk_link_set_lpm()
973 ufs_mtk_unipro_set_lpm(hba, false); in ufs_mtk_link_set_lpm()
980 static void ufs_mtk_vreg_set_lpm(struct ufs_hba *hba, bool lpm) in ufs_mtk_vreg_set_lpm() argument
982 if (!hba->vreg_info.vccq2 || !hba->vreg_info.vcc) in ufs_mtk_vreg_set_lpm()
985 if (lpm && !hba->vreg_info.vcc->enabled) in ufs_mtk_vreg_set_lpm()
986 regulator_set_mode(hba->vreg_info.vccq2->reg, in ufs_mtk_vreg_set_lpm()
989 regulator_set_mode(hba->vreg_info.vccq2->reg, in ufs_mtk_vreg_set_lpm()
993 static void ufs_mtk_auto_hibern8_disable(struct ufs_hba *hba) in ufs_mtk_auto_hibern8_disable() argument
999 spin_lock_irqsave(hba->host->host_lock, flags); in ufs_mtk_auto_hibern8_disable()
1000 ufshcd_writel(hba, 0, REG_AUTO_HIBERNATE_IDLE_TIMER); in ufs_mtk_auto_hibern8_disable()
1001 spin_unlock_irqrestore(hba->host->host_lock, flags); in ufs_mtk_auto_hibern8_disable()
1004 ufs_mtk_wait_idle_state(hba, 5); in ufs_mtk_auto_hibern8_disable()
1006 ret = ufs_mtk_wait_link_state(hba, VS_LINK_UP, 100); in ufs_mtk_auto_hibern8_disable()
1008 dev_warn(hba->dev, "exit h8 state fail, ret=%d\n", ret); in ufs_mtk_auto_hibern8_disable()
1011 static int ufs_mtk_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op, in ufs_mtk_suspend() argument
1018 if (!ufshcd_is_auto_hibern8_supported(hba)) in ufs_mtk_suspend()
1020 ufs_mtk_auto_hibern8_disable(hba); in ufs_mtk_suspend()
1024 if (ufshcd_is_link_hibern8(hba)) { in ufs_mtk_suspend()
1025 err = ufs_mtk_link_set_lpm(hba); in ufs_mtk_suspend()
1030 if (!ufshcd_is_link_active(hba)) { in ufs_mtk_suspend()
1036 ufs_mtk_vreg_set_lpm(hba, true); in ufs_mtk_suspend()
1037 err = ufs_mtk_mphy_power_on(hba, false); in ufs_mtk_suspend()
1042 if (ufshcd_is_link_off(hba)) in ufs_mtk_suspend()
1052 ufshcd_set_link_off(hba); in ufs_mtk_suspend()
1056 static int ufs_mtk_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op) in ufs_mtk_resume() argument
1060 err = ufs_mtk_mphy_power_on(hba, true); in ufs_mtk_resume()
1064 ufs_mtk_vreg_set_lpm(hba, false); in ufs_mtk_resume()
1066 if (ufshcd_is_link_hibern8(hba)) { in ufs_mtk_resume()
1067 err = ufs_mtk_link_set_hpm(hba); in ufs_mtk_resume()
1074 return ufshcd_link_recovery(hba); in ufs_mtk_resume()
1077 static void ufs_mtk_dbg_register_dump(struct ufs_hba *hba) in ufs_mtk_dbg_register_dump() argument
1079 ufshcd_dump_regs(hba, REG_UFS_REFCLK_CTRL, 0x4, "Ref-Clk Ctrl "); in ufs_mtk_dbg_register_dump()
1081 ufshcd_dump_regs(hba, REG_UFS_EXTREG, 0x4, "Ext Reg "); in ufs_mtk_dbg_register_dump()
1083 ufshcd_dump_regs(hba, REG_UFS_MPHYCTRL, in ufs_mtk_dbg_register_dump()
1088 ufs_mtk_dbg_sel(hba); in ufs_mtk_dbg_register_dump()
1089 ufshcd_dump_regs(hba, REG_UFS_PROBE, 0x4, "Debug Probe "); in ufs_mtk_dbg_register_dump()
1092 static int ufs_mtk_apply_dev_quirks(struct ufs_hba *hba) in ufs_mtk_apply_dev_quirks() argument
1094 struct ufs_dev_info *dev_info = &hba->dev_info; in ufs_mtk_apply_dev_quirks()
1098 ufshcd_dme_set(hba, UIC_ARG_MIB(PA_TACTIVATE), 6); in ufs_mtk_apply_dev_quirks()
1106 ufs_mtk_setup_ref_clk_wait_us(hba, 1); in ufs_mtk_apply_dev_quirks()
1108 ufs_mtk_setup_ref_clk_wait_us(hba, 30); in ufs_mtk_apply_dev_quirks()
1110 ufs_mtk_setup_ref_clk_wait_us(hba, 100); in ufs_mtk_apply_dev_quirks()
1112 ufs_mtk_setup_ref_clk_wait_us(hba, in ufs_mtk_apply_dev_quirks()
1118 static void ufs_mtk_fixup_dev_quirks(struct ufs_hba *hba) in ufs_mtk_fixup_dev_quirks() argument
1120 ufshcd_fixup_dev_quirks(hba, ufs_mtk_dev_fixups); in ufs_mtk_fixup_dev_quirks()
1122 if (ufs_mtk_is_broken_vcc(hba) && hba->vreg_info.vcc && in ufs_mtk_fixup_dev_quirks()
1123 (hba->dev_quirks & UFS_DEVICE_QUIRK_DELAY_AFTER_LPM)) { in ufs_mtk_fixup_dev_quirks()
1124 hba->vreg_info.vcc->always_on = true; in ufs_mtk_fixup_dev_quirks()
1129 hba->dev_quirks &= ~(UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM | in ufs_mtk_fixup_dev_quirks()
1134 static void ufs_mtk_event_notify(struct ufs_hba *hba, in ufs_mtk_event_notify() argument
1223 struct ufs_hba *hba = platform_get_drvdata(pdev); in ufs_mtk_remove() local
1226 ufshcd_remove(hba); in ufs_mtk_remove()