@@ -829,7 +829,7 @@ static u32 ice_ptp_tmr_cmd_to_port_reg(struct ice_hw *hw,
829829 /* Certain hardware families share the same register values for the
830830 * port register and source timer register.
831831 */
832- switch (hw -> ptp . phy_model ) {
832+ switch (ice_get_phy_model ( hw ) ) {
833833 case ICE_PHY_E810 :
834834 return ice_ptp_tmr_cmd_to_src_reg (hw , cmd ) & TS_CMD_MASK_E810 ;
835835 default :
@@ -5502,7 +5502,7 @@ void ice_ptp_init_hw(struct ice_hw *hw)
55025502static int ice_ptp_write_port_cmd (struct ice_hw * hw , u8 port ,
55035503 enum ice_ptp_tmr_cmd cmd )
55045504{
5505- switch (hw -> ptp . phy_model ) {
5505+ switch (ice_get_phy_model ( hw ) ) {
55065506 case ICE_PHY_ETH56G :
55075507 return ice_ptp_write_port_cmd_eth56g (hw , port , cmd );
55085508 case ICE_PHY_E82X :
@@ -5567,7 +5567,7 @@ static int ice_ptp_port_cmd(struct ice_hw *hw, enum ice_ptp_tmr_cmd cmd)
55675567 u32 port ;
55685568
55695569 /* PHY models which can program all ports simultaneously */
5570- switch (hw -> ptp . phy_model ) {
5570+ switch (ice_get_phy_model ( hw ) ) {
55715571 case ICE_PHY_E810 :
55725572 return ice_ptp_port_cmd_e810 (hw , cmd );
55735573 default :
@@ -5646,7 +5646,7 @@ int ice_ptp_init_time(struct ice_hw *hw, u64 time)
56465646
56475647 /* PHY timers */
56485648 /* Fill Rx and Tx ports and send msg to PHY */
5649- switch (hw -> ptp . phy_model ) {
5649+ switch (ice_get_phy_model ( hw ) ) {
56505650 case ICE_PHY_ETH56G :
56515651 err = ice_ptp_prep_phy_time_eth56g (hw ,
56525652 (u32 )(time & 0xFFFFFFFF ));
@@ -5692,7 +5692,7 @@ int ice_ptp_write_incval(struct ice_hw *hw, u64 incval)
56925692 wr32 (hw , GLTSYN_SHADJ_L (tmr_idx ), lower_32_bits (incval ));
56935693 wr32 (hw , GLTSYN_SHADJ_H (tmr_idx ), upper_32_bits (incval ));
56945694
5695- switch (hw -> ptp . phy_model ) {
5695+ switch (ice_get_phy_model ( hw ) ) {
56965696 case ICE_PHY_ETH56G :
56975697 err = ice_ptp_prep_phy_incval_eth56g (hw , incval );
56985698 break ;
@@ -5761,7 +5761,7 @@ int ice_ptp_adj_clock(struct ice_hw *hw, s32 adj)
57615761 wr32 (hw , GLTSYN_SHADJ_L (tmr_idx ), 0 );
57625762 wr32 (hw , GLTSYN_SHADJ_H (tmr_idx ), adj );
57635763
5764- switch (hw -> ptp . phy_model ) {
5764+ switch (ice_get_phy_model ( hw ) ) {
57655765 case ICE_PHY_ETH56G :
57665766 err = ice_ptp_prep_phy_adj_eth56g (hw , adj );
57675767 break ;
@@ -5794,7 +5794,7 @@ int ice_ptp_adj_clock(struct ice_hw *hw, s32 adj)
57945794 */
57955795int ice_read_phy_tstamp (struct ice_hw * hw , u8 block , u8 idx , u64 * tstamp )
57965796{
5797- switch (hw -> ptp . phy_model ) {
5797+ switch (ice_get_phy_model ( hw ) ) {
57985798 case ICE_PHY_ETH56G :
57995799 return ice_read_ptp_tstamp_eth56g (hw , block , idx , tstamp );
58005800 case ICE_PHY_E810 :
@@ -5824,7 +5824,7 @@ int ice_read_phy_tstamp(struct ice_hw *hw, u8 block, u8 idx, u64 *tstamp)
58245824 */
58255825int ice_clear_phy_tstamp (struct ice_hw * hw , u8 block , u8 idx )
58265826{
5827- switch (hw -> ptp . phy_model ) {
5827+ switch (ice_get_phy_model ( hw ) ) {
58285828 case ICE_PHY_ETH56G :
58295829 return ice_clear_ptp_tstamp_eth56g (hw , block , idx );
58305830 case ICE_PHY_E810 :
@@ -5887,7 +5887,7 @@ static int ice_get_pf_c827_idx(struct ice_hw *hw, u8 *idx)
58875887 */
58885888void ice_ptp_reset_ts_memory (struct ice_hw * hw )
58895889{
5890- switch (hw -> ptp . phy_model ) {
5890+ switch (ice_get_phy_model ( hw ) ) {
58915891 case ICE_PHY_ETH56G :
58925892 ice_ptp_reset_ts_memory_eth56g (hw );
58935893 break ;
@@ -5916,7 +5916,7 @@ int ice_ptp_init_phc(struct ice_hw *hw)
59165916 /* Clear event err indications for auxiliary pins */
59175917 (void )rd32 (hw , GLTSYN_STAT (src_idx ));
59185918
5919- switch (hw -> ptp . phy_model ) {
5919+ switch (ice_get_phy_model ( hw ) ) {
59205920 case ICE_PHY_ETH56G :
59215921 return ice_ptp_init_phc_eth56g (hw );
59225922 case ICE_PHY_E810 :
@@ -5941,7 +5941,7 @@ int ice_ptp_init_phc(struct ice_hw *hw)
59415941 */
59425942int ice_get_phy_tx_tstamp_ready (struct ice_hw * hw , u8 block , u64 * tstamp_ready )
59435943{
5944- switch (hw -> ptp . phy_model ) {
5944+ switch (ice_get_phy_model ( hw ) ) {
59455945 case ICE_PHY_ETH56G :
59465946 return ice_get_phy_tx_tstamp_ready_eth56g (hw , block ,
59475947 tstamp_ready );
0 commit comments