@@ -426,11 +426,8 @@ static void dsi_pll_enable_pll_bias(struct dsi_pll_7nm *pll)
426426 u32 data ;
427427
428428 spin_lock_irqsave (& pll -> pll_enable_lock , flags );
429- if (pll -> pll_enable_cnt ++ ) {
430- spin_unlock_irqrestore (& pll -> pll_enable_lock , flags );
431- WARN_ON (pll -> pll_enable_cnt == INT_MAX );
432- return ;
433- }
429+ pll -> pll_enable_cnt ++ ;
430+ WARN_ON (pll -> pll_enable_cnt == INT_MAX );
434431
435432 data = readl (pll -> phy -> base + REG_DSI_7nm_PHY_CMN_CTRL_0 );
436433 data |= DSI_7nm_PHY_CMN_CTRL_0_PLL_SHUTDOWNB ;
@@ -876,7 +873,6 @@ static int dsi_pll_7nm_init(struct msm_dsi_phy *phy)
876873 spin_lock_init (& pll_7nm -> pll_enable_lock );
877874
878875 pll_7nm -> phy = phy ;
879- phy -> pll_data = pll_7nm ;
880876
881877 ret = pll_7nm_register (pll_7nm , phy -> provided_clocks -> hws );
882878 if (ret ) {
@@ -965,10 +961,8 @@ static int dsi_7nm_phy_enable(struct msm_dsi_phy *phy,
965961 u32 const delay_us = 5 ;
966962 u32 const timeout_us = 1000 ;
967963 struct msm_dsi_dphy_timing * timing = & phy -> timing ;
968- struct dsi_pll_7nm * pll = phy -> pll_data ;
969964 void __iomem * base = phy -> base ;
970965 bool less_than_1500_mhz ;
971- unsigned long flags ;
972966 u32 vreg_ctrl_0 , vreg_ctrl_1 , lane_ctrl0 ;
973967 u32 glbl_pemph_ctrl_0 ;
974968 u32 glbl_str_swi_cal_sel_ctrl , glbl_hstx_str_ctrl_0 ;
@@ -1090,13 +1084,10 @@ static int dsi_7nm_phy_enable(struct msm_dsi_phy *phy,
10901084 glbl_rescode_bot_ctrl = 0x3c ;
10911085 }
10921086
1093- spin_lock_irqsave (& pll -> pll_enable_lock , flags );
1094- pll -> pll_enable_cnt = 1 ;
10951087 /* de-assert digital and pll power down */
10961088 data = DSI_7nm_PHY_CMN_CTRL_0_DIGTOP_PWRDN_B |
10971089 DSI_7nm_PHY_CMN_CTRL_0_PLL_SHUTDOWNB ;
10981090 writel (data , base + REG_DSI_7nm_PHY_CMN_CTRL_0 );
1099- spin_unlock_irqrestore (& pll -> pll_enable_lock , flags );
11001091
11011092 /* Assert PLL core reset */
11021093 writel (0x00 , base + REG_DSI_7nm_PHY_CMN_PLL_CNTRL );
@@ -1209,9 +1200,7 @@ static bool dsi_7nm_set_continuous_clock(struct msm_dsi_phy *phy, bool enable)
12091200
12101201static void dsi_7nm_phy_disable (struct msm_dsi_phy * phy )
12111202{
1212- struct dsi_pll_7nm * pll = phy -> pll_data ;
12131203 void __iomem * base = phy -> base ;
1214- unsigned long flags ;
12151204 u32 data ;
12161205
12171206 DBG ("" );
@@ -1238,11 +1227,8 @@ static void dsi_7nm_phy_disable(struct msm_dsi_phy *phy)
12381227 writel (data , base + REG_DSI_7nm_PHY_CMN_CTRL_0 );
12391228 writel (0 , base + REG_DSI_7nm_PHY_CMN_LANE_CTRL0 );
12401229
1241- spin_lock_irqsave (& pll -> pll_enable_lock , flags );
1242- pll -> pll_enable_cnt = 0 ;
12431230 /* Turn off all PHY blocks */
12441231 writel (0x00 , base + REG_DSI_7nm_PHY_CMN_CTRL_0 );
1245- spin_unlock_irqrestore (& pll -> pll_enable_lock , flags );
12461232
12471233 /* make sure phy is turned off */
12481234 wmb ();
0 commit comments