@@ -1526,12 +1526,12 @@ static void exynos_ufs_dev_hw_reset(struct ufs_hba *hba)
1526
1526
hci_writel (ufs , 1 << 0 , HCI_GPIO_OUT );
1527
1527
}
1528
1528
1529
- static void exynos_ufs_pre_hibern8 (struct ufs_hba * hba , u8 enter )
1529
+ static void exynos_ufs_pre_hibern8 (struct ufs_hba * hba , enum uic_cmd_dme cmd )
1530
1530
{
1531
1531
struct exynos_ufs * ufs = ufshcd_get_variant (hba );
1532
1532
struct exynos_ufs_uic_attr * attr = ufs -> drv_data -> uic_attr ;
1533
1533
1534
- if (! enter ) {
1534
+ if (cmd == UIC_CMD_DME_HIBER_EXIT ) {
1535
1535
if (ufs -> opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL )
1536
1536
exynos_ufs_disable_auto_ctrl_hcc (ufs );
1537
1537
exynos_ufs_ungate_clks (ufs );
@@ -1559,11 +1559,11 @@ static void exynos_ufs_pre_hibern8(struct ufs_hba *hba, u8 enter)
1559
1559
}
1560
1560
}
1561
1561
1562
- static void exynos_ufs_post_hibern8 (struct ufs_hba * hba , u8 enter )
1562
+ static void exynos_ufs_post_hibern8 (struct ufs_hba * hba , enum uic_cmd_dme cmd )
1563
1563
{
1564
1564
struct exynos_ufs * ufs = ufshcd_get_variant (hba );
1565
1565
1566
- if (! enter ) {
1566
+ if (cmd == UIC_CMD_DME_HIBER_EXIT ) {
1567
1567
u32 cur_mode = 0 ;
1568
1568
u32 pwrmode ;
1569
1569
@@ -1582,7 +1582,7 @@ static void exynos_ufs_post_hibern8(struct ufs_hba *hba, u8 enter)
1582
1582
1583
1583
if (!(ufs -> opts & EXYNOS_UFS_OPT_SKIP_CONNECTION_ESTAB ))
1584
1584
exynos_ufs_establish_connt (ufs );
1585
- } else {
1585
+ } else if ( cmd == UIC_CMD_DME_HIBER_ENTER ) {
1586
1586
ufs -> entry_hibern8_t = ktime_get ();
1587
1587
exynos_ufs_gate_clks (ufs );
1588
1588
if (ufs -> opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL )
@@ -1669,15 +1669,15 @@ static int exynos_ufs_pwr_change_notify(struct ufs_hba *hba,
1669
1669
}
1670
1670
1671
1671
static void exynos_ufs_hibern8_notify (struct ufs_hba * hba ,
1672
- enum uic_cmd_dme enter ,
1672
+ enum uic_cmd_dme cmd ,
1673
1673
enum ufs_notify_change_status notify )
1674
1674
{
1675
1675
switch ((u8 )notify ) {
1676
1676
case PRE_CHANGE :
1677
- exynos_ufs_pre_hibern8 (hba , enter );
1677
+ exynos_ufs_pre_hibern8 (hba , cmd );
1678
1678
break ;
1679
1679
case POST_CHANGE :
1680
- exynos_ufs_post_hibern8 (hba , enter );
1680
+ exynos_ufs_post_hibern8 (hba , cmd );
1681
1681
break ;
1682
1682
}
1683
1683
}
0 commit comments