@@ -1228,12 +1228,12 @@ static void exynos_ufs_dev_hw_reset(struct ufs_hba *hba)
12281228 hci_writel (ufs , 1 << 0 , HCI_GPIO_OUT );
12291229}
12301230
1231- static void exynos_ufs_pre_hibern8 (struct ufs_hba * hba , u8 enter )
1231+ static void exynos_ufs_pre_hibern8 (struct ufs_hba * hba , enum uic_cmd_dme cmd )
12321232{
12331233 struct exynos_ufs * ufs = ufshcd_get_variant (hba );
12341234 struct exynos_ufs_uic_attr * attr = ufs -> drv_data -> uic_attr ;
12351235
1236- if (! enter ) {
1236+ if (cmd == UIC_CMD_DME_HIBER_EXIT ) {
12371237 if (ufs -> opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL )
12381238 exynos_ufs_disable_auto_ctrl_hcc (ufs );
12391239 exynos_ufs_ungate_clks (ufs );
@@ -1261,11 +1261,11 @@ static void exynos_ufs_pre_hibern8(struct ufs_hba *hba, u8 enter)
12611261 }
12621262}
12631263
1264- static void exynos_ufs_post_hibern8 (struct ufs_hba * hba , u8 enter )
1264+ static void exynos_ufs_post_hibern8 (struct ufs_hba * hba , enum uic_cmd_dme cmd )
12651265{
12661266 struct exynos_ufs * ufs = ufshcd_get_variant (hba );
12671267
1268- if (! enter ) {
1268+ if (cmd == UIC_CMD_DME_HIBER_EXIT ) {
12691269 u32 cur_mode = 0 ;
12701270 u32 pwrmode ;
12711271
@@ -1284,7 +1284,7 @@ static void exynos_ufs_post_hibern8(struct ufs_hba *hba, u8 enter)
12841284
12851285 if (!(ufs -> opts & EXYNOS_UFS_OPT_SKIP_CONNECTION_ESTAB ))
12861286 exynos_ufs_establish_connt (ufs );
1287- } else {
1287+ } else if ( cmd == UIC_CMD_DME_HIBER_ENTER ) {
12881288 ufs -> entry_hibern8_t = ktime_get ();
12891289 exynos_ufs_gate_clks (ufs );
12901290 if (ufs -> opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL )
@@ -1363,15 +1363,15 @@ static int exynos_ufs_pwr_change_notify(struct ufs_hba *hba,
13631363}
13641364
13651365static void exynos_ufs_hibern8_notify (struct ufs_hba * hba ,
1366- enum uic_cmd_dme enter ,
1366+ enum uic_cmd_dme cmd ,
13671367 enum ufs_notify_change_status notify )
13681368{
13691369 switch ((u8 )notify ) {
13701370 case PRE_CHANGE :
1371- exynos_ufs_pre_hibern8 (hba , enter );
1371+ exynos_ufs_pre_hibern8 (hba , cmd );
13721372 break ;
13731373 case POST_CHANGE :
1374- exynos_ufs_post_hibern8 (hba , enter );
1374+ exynos_ufs_post_hibern8 (hba , cmd );
13751375 break ;
13761376 }
13771377}
0 commit comments