@@ -804,7 +804,7 @@ static u32 ice_ptp_tmr_cmd_to_port_reg(struct ice_hw *hw,
804
804
/* Certain hardware families share the same register values for the
805
805
* port register and source timer register.
806
806
*/
807
- switch (hw -> ptp . phy_model ) {
807
+ switch (ice_get_phy_model ( hw ) ) {
808
808
case ICE_PHY_E810 :
809
809
return ice_ptp_tmr_cmd_to_src_reg (hw , cmd ) & TS_CMD_MASK_E810 ;
810
810
default :
@@ -5461,7 +5461,7 @@ void ice_ptp_init_hw(struct ice_hw *hw)
5461
5461
static int ice_ptp_write_port_cmd (struct ice_hw * hw , u8 port ,
5462
5462
enum ice_ptp_tmr_cmd cmd )
5463
5463
{
5464
- switch (hw -> ptp . phy_model ) {
5464
+ switch (ice_get_phy_model ( hw ) ) {
5465
5465
case ICE_PHY_ETH56G :
5466
5466
return ice_ptp_write_port_cmd_eth56g (hw , port , cmd );
5467
5467
case ICE_PHY_E82X :
@@ -5526,7 +5526,7 @@ static int ice_ptp_port_cmd(struct ice_hw *hw, enum ice_ptp_tmr_cmd cmd)
5526
5526
u32 port ;
5527
5527
5528
5528
/* PHY models which can program all ports simultaneously */
5529
- switch (hw -> ptp . phy_model ) {
5529
+ switch (ice_get_phy_model ( hw ) ) {
5530
5530
case ICE_PHY_E810 :
5531
5531
return ice_ptp_port_cmd_e810 (hw , cmd );
5532
5532
default :
@@ -5605,7 +5605,7 @@ int ice_ptp_init_time(struct ice_hw *hw, u64 time)
5605
5605
5606
5606
/* PHY timers */
5607
5607
/* Fill Rx and Tx ports and send msg to PHY */
5608
- switch (hw -> ptp . phy_model ) {
5608
+ switch (ice_get_phy_model ( hw ) ) {
5609
5609
case ICE_PHY_ETH56G :
5610
5610
err = ice_ptp_prep_phy_time_eth56g (hw ,
5611
5611
(u32 )(time & 0xFFFFFFFF ));
@@ -5651,7 +5651,7 @@ int ice_ptp_write_incval(struct ice_hw *hw, u64 incval)
5651
5651
wr32 (hw , GLTSYN_SHADJ_L (tmr_idx ), lower_32_bits (incval ));
5652
5652
wr32 (hw , GLTSYN_SHADJ_H (tmr_idx ), upper_32_bits (incval ));
5653
5653
5654
- switch (hw -> ptp . phy_model ) {
5654
+ switch (ice_get_phy_model ( hw ) ) {
5655
5655
case ICE_PHY_ETH56G :
5656
5656
err = ice_ptp_prep_phy_incval_eth56g (hw , incval );
5657
5657
break ;
@@ -5720,7 +5720,7 @@ int ice_ptp_adj_clock(struct ice_hw *hw, s32 adj)
5720
5720
wr32 (hw , GLTSYN_SHADJ_L (tmr_idx ), 0 );
5721
5721
wr32 (hw , GLTSYN_SHADJ_H (tmr_idx ), adj );
5722
5722
5723
- switch (hw -> ptp . phy_model ) {
5723
+ switch (ice_get_phy_model ( hw ) ) {
5724
5724
case ICE_PHY_ETH56G :
5725
5725
err = ice_ptp_prep_phy_adj_eth56g (hw , adj );
5726
5726
break ;
@@ -5753,7 +5753,7 @@ int ice_ptp_adj_clock(struct ice_hw *hw, s32 adj)
5753
5753
*/
5754
5754
int ice_read_phy_tstamp (struct ice_hw * hw , u8 block , u8 idx , u64 * tstamp )
5755
5755
{
5756
- switch (hw -> ptp . phy_model ) {
5756
+ switch (ice_get_phy_model ( hw ) ) {
5757
5757
case ICE_PHY_ETH56G :
5758
5758
return ice_read_ptp_tstamp_eth56g (hw , block , idx , tstamp );
5759
5759
case ICE_PHY_E810 :
@@ -5783,7 +5783,7 @@ int ice_read_phy_tstamp(struct ice_hw *hw, u8 block, u8 idx, u64 *tstamp)
5783
5783
*/
5784
5784
int ice_clear_phy_tstamp (struct ice_hw * hw , u8 block , u8 idx )
5785
5785
{
5786
- switch (hw -> ptp . phy_model ) {
5786
+ switch (ice_get_phy_model ( hw ) ) {
5787
5787
case ICE_PHY_ETH56G :
5788
5788
return ice_clear_ptp_tstamp_eth56g (hw , block , idx );
5789
5789
case ICE_PHY_E810 :
@@ -5846,7 +5846,7 @@ static int ice_get_pf_c827_idx(struct ice_hw *hw, u8 *idx)
5846
5846
*/
5847
5847
void ice_ptp_reset_ts_memory (struct ice_hw * hw )
5848
5848
{
5849
- switch (hw -> ptp . phy_model ) {
5849
+ switch (ice_get_phy_model ( hw ) ) {
5850
5850
case ICE_PHY_ETH56G :
5851
5851
ice_ptp_reset_ts_memory_eth56g (hw );
5852
5852
break ;
@@ -5875,7 +5875,7 @@ int ice_ptp_init_phc(struct ice_hw *hw)
5875
5875
/* Clear event err indications for auxiliary pins */
5876
5876
(void )rd32 (hw , GLTSYN_STAT (src_idx ));
5877
5877
5878
- switch (hw -> ptp . phy_model ) {
5878
+ switch (ice_get_phy_model ( hw ) ) {
5879
5879
case ICE_PHY_ETH56G :
5880
5880
return ice_ptp_init_phc_eth56g (hw );
5881
5881
case ICE_PHY_E810 :
@@ -5900,7 +5900,7 @@ int ice_ptp_init_phc(struct ice_hw *hw)
5900
5900
*/
5901
5901
int ice_get_phy_tx_tstamp_ready (struct ice_hw * hw , u8 block , u64 * tstamp_ready )
5902
5902
{
5903
- switch (hw -> ptp . phy_model ) {
5903
+ switch (ice_get_phy_model ( hw ) ) {
5904
5904
case ICE_PHY_ETH56G :
5905
5905
return ice_get_phy_tx_tstamp_ready_eth56g (hw , block ,
5906
5906
tstamp_ready );
0 commit comments