}
 }
 
+static int exynos_ufs_setup_clocks(struct ufs_hba *hba, bool on,
+                                  enum ufs_notify_change_status status)
+{
+       struct exynos_ufs *ufs = ufshcd_get_variant(hba);
+
+       if (!ufs)
+               return 0;
+
+       if (on && status == PRE_CHANGE) {
+               if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL)
+                       exynos_ufs_disable_auto_ctrl_hcc(ufs);
+               exynos_ufs_ungate_clks(ufs);
+       } else if (!on && status == POST_CHANGE) {
+               exynos_ufs_gate_clks(ufs);
+               if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL)
+                       exynos_ufs_enable_auto_ctrl_hcc(ufs);
+       }
+
+       return 0;
+}
+
 static int exynos_ufs_pre_link(struct ufs_hba *hba)
 {
        struct exynos_ufs *ufs = ufshcd_get_variant(hba);
        exynos_ufs_config_phy_time_attr(ufs);
        exynos_ufs_config_phy_cap_attr(ufs);
 
+       exynos_ufs_setup_clocks(hba, true, PRE_CHANGE);
+
        if (ufs->drv_data->pre_link)
                ufs->drv_data->pre_link(ufs);
 
        .hce_enable_notify              = exynos_ufs_hce_enable_notify,
        .link_startup_notify            = exynos_ufs_link_startup_notify,
        .pwr_change_notify              = exynos_ufs_pwr_change_notify,
+       .setup_clocks                   = exynos_ufs_setup_clocks,
        .setup_xfer_req                 = exynos_ufs_specify_nexus_t_xfer_req,
        .setup_task_mgmt                = exynos_ufs_specify_nexus_t_tm_req,
        .hibern8_notify                 = exynos_ufs_hibern8_notify,