@@ -827,7 +827,7 @@ static u32 ice_ptp_tmr_cmd_to_port_reg(struct ice_hw *hw,
827827 /* Certain hardware families share the same register values for the
828828 * port register and source timer register.
829829 */
830- switch (hw -> ptp . phy_model ) {
830+ switch (ice_get_phy_model ( hw ) ) {
831831 case ICE_PHY_E810 :
832832 return ice_ptp_tmr_cmd_to_src_reg (hw , cmd ) & TS_CMD_MASK_E810 ;
833833 default :
@@ -5639,7 +5639,7 @@ void ice_ptp_init_hw(struct ice_hw *hw)
56395639static int ice_ptp_write_port_cmd (struct ice_hw * hw , u8 port ,
56405640 enum ice_ptp_tmr_cmd cmd )
56415641{
5642- switch (hw -> ptp . phy_model ) {
5642+ switch (ice_get_phy_model ( hw ) ) {
56435643 case ICE_PHY_ETH56G :
56445644 return ice_ptp_write_port_cmd_eth56g (hw , port , cmd );
56455645 case ICE_PHY_E82X :
@@ -5704,7 +5704,7 @@ static int ice_ptp_port_cmd(struct ice_hw *hw, enum ice_ptp_tmr_cmd cmd)
57045704 u32 port ;
57055705
57065706 /* PHY models which can program all ports simultaneously */
5707- switch (hw -> ptp . phy_model ) {
5707+ switch (ice_get_phy_model ( hw ) ) {
57085708 case ICE_PHY_E810 :
57095709 return ice_ptp_port_cmd_e810 (hw , cmd );
57105710 default :
@@ -5783,7 +5783,7 @@ int ice_ptp_init_time(struct ice_hw *hw, u64 time)
57835783
57845784 /* PHY timers */
57855785 /* Fill Rx and Tx ports and send msg to PHY */
5786- switch (hw -> ptp . phy_model ) {
5786+ switch (ice_get_phy_model ( hw ) ) {
57875787 case ICE_PHY_ETH56G :
57885788 err = ice_ptp_prep_phy_time_eth56g (hw ,
57895789 (u32 )(time & 0xFFFFFFFF ));
@@ -5829,7 +5829,7 @@ int ice_ptp_write_incval(struct ice_hw *hw, u64 incval)
58295829 wr32 (hw , GLTSYN_SHADJ_L (tmr_idx ), lower_32_bits (incval ));
58305830 wr32 (hw , GLTSYN_SHADJ_H (tmr_idx ), upper_32_bits (incval ));
58315831
5832- switch (hw -> ptp . phy_model ) {
5832+ switch (ice_get_phy_model ( hw ) ) {
58335833 case ICE_PHY_ETH56G :
58345834 err = ice_ptp_prep_phy_incval_eth56g (hw , incval );
58355835 break ;
@@ -5898,7 +5898,7 @@ int ice_ptp_adj_clock(struct ice_hw *hw, s32 adj)
58985898 wr32 (hw , GLTSYN_SHADJ_L (tmr_idx ), 0 );
58995899 wr32 (hw , GLTSYN_SHADJ_H (tmr_idx ), adj );
59005900
5901- switch (hw -> ptp . phy_model ) {
5901+ switch (ice_get_phy_model ( hw ) ) {
59025902 case ICE_PHY_ETH56G :
59035903 err = ice_ptp_prep_phy_adj_eth56g (hw , adj );
59045904 break ;
@@ -5931,7 +5931,7 @@ int ice_ptp_adj_clock(struct ice_hw *hw, s32 adj)
59315931 */
59325932int ice_read_phy_tstamp (struct ice_hw * hw , u8 block , u8 idx , u64 * tstamp )
59335933{
5934- switch (hw -> ptp . phy_model ) {
5934+ switch (ice_get_phy_model ( hw ) ) {
59355935 case ICE_PHY_ETH56G :
59365936 return ice_read_ptp_tstamp_eth56g (hw , block , idx , tstamp );
59375937 case ICE_PHY_E810 :
@@ -5961,7 +5961,7 @@ int ice_read_phy_tstamp(struct ice_hw *hw, u8 block, u8 idx, u64 *tstamp)
59615961 */
59625962int ice_clear_phy_tstamp (struct ice_hw * hw , u8 block , u8 idx )
59635963{
5964- switch (hw -> ptp . phy_model ) {
5964+ switch (ice_get_phy_model ( hw ) ) {
59655965 case ICE_PHY_ETH56G :
59665966 return ice_clear_ptp_tstamp_eth56g (hw , block , idx );
59675967 case ICE_PHY_E810 :
@@ -6024,7 +6024,7 @@ static int ice_get_pf_c827_idx(struct ice_hw *hw, u8 *idx)
60246024 */
60256025void ice_ptp_reset_ts_memory (struct ice_hw * hw )
60266026{
6027- switch (hw -> ptp . phy_model ) {
6027+ switch (ice_get_phy_model ( hw ) ) {
60286028 case ICE_PHY_ETH56G :
60296029 ice_ptp_reset_ts_memory_eth56g (hw );
60306030 break ;
@@ -6053,7 +6053,7 @@ int ice_ptp_init_phc(struct ice_hw *hw)
60536053 /* Clear event err indications for auxiliary pins */
60546054 (void )rd32 (hw , GLTSYN_STAT (src_idx ));
60556055
6056- switch (hw -> ptp . phy_model ) {
6056+ switch (ice_get_phy_model ( hw ) ) {
60576057 case ICE_PHY_ETH56G :
60586058 return ice_ptp_init_phc_eth56g (hw );
60596059 case ICE_PHY_E810 :
@@ -6078,7 +6078,7 @@ int ice_ptp_init_phc(struct ice_hw *hw)
60786078 */
60796079int ice_get_phy_tx_tstamp_ready (struct ice_hw * hw , u8 block , u64 * tstamp_ready )
60806080{
6081- switch (hw -> ptp . phy_model ) {
6081+ switch (ice_get_phy_model ( hw ) ) {
60826082 case ICE_PHY_ETH56G :
60836083 return ice_get_phy_tx_tstamp_ready_eth56g (hw , block ,
60846084 tstamp_ready );
0 commit comments