Skip to content

Commit 3d10116

Browse files
petegriffinmartinkpetersen
authored andcommitted
scsi: ufs: exynos: Ensure pre_link() executes before exynos_ufs_phy_init()
Ensure clocks are enabled before configuring unipro. Additionally move the pre_link() hook before the exynos_ufs_phy_init() calls. This means the register write sequence more closely resembles the ordering of the downstream driver. Signed-off-by: Peter Griffin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 2014c95 commit 3d10116

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/ufs/host/ufs-exynos.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,21 +1049,21 @@ static int exynos_ufs_pre_link(struct ufs_hba *hba)
10491049
exynos_ufs_config_intr(ufs, DFES_DEF_L4_ERRS, UNIPRO_L4);
10501050
exynos_ufs_set_unipro_pclk_div(ufs);
10511051

1052+
exynos_ufs_setup_clocks(hba, true, PRE_CHANGE);
1053+
10521054
/* unipro */
10531055
exynos_ufs_config_unipro(ufs);
10541056

1057+
if (ufs->drv_data->pre_link)
1058+
ufs->drv_data->pre_link(ufs);
1059+
10551060
/* m-phy */
10561061
exynos_ufs_phy_init(ufs);
10571062
if (!(ufs->opts & EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR)) {
10581063
exynos_ufs_config_phy_time_attr(ufs);
10591064
exynos_ufs_config_phy_cap_attr(ufs);
10601065
}
10611066

1062-
exynos_ufs_setup_clocks(hba, true, PRE_CHANGE);
1063-
1064-
if (ufs->drv_data->pre_link)
1065-
ufs->drv_data->pre_link(ufs);
1066-
10671067
return 0;
10681068
}
10691069

0 commit comments

Comments
 (0)