diff options
Diffstat (limited to 'drivers/emac-dwc-eqos/DWC_ETH_QOS_ptp.c')
-rw-r--r-- | drivers/emac-dwc-eqos/DWC_ETH_QOS_ptp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/emac-dwc-eqos/DWC_ETH_QOS_ptp.c b/drivers/emac-dwc-eqos/DWC_ETH_QOS_ptp.c index 9223244..1bcead3 100644 --- a/drivers/emac-dwc-eqos/DWC_ETH_QOS_ptp.c +++ b/drivers/emac-dwc-eqos/DWC_ETH_QOS_ptp.c @@ -283,8 +283,8 @@ static struct ptp_clock_info DWC_ETH_QOS_ptp_clock_ops = { int DWC_ETH_QOS_ptp_init(struct DWC_ETH_QOS_prv_data *pdata) { int ret = 0; - struct ifr_data_struct req = {0}; #ifdef CONFIG_PPS_OUTPUT + struct ifr_data_struct req = {0}; struct ETH_PPS_Config eth_pps_cfg = {0}; #endif @@ -315,12 +315,13 @@ int DWC_ETH_QOS_ptp_init(struct DWC_ETH_QOS_prv_data *pdata) } #ifdef CONFIG_PPS_OUTPUT - if (pdata->emac_hw_version_type == EMAC_HW_v2_3_1) { - /*Configuaring PPS0 PPS output frequency to defualt 19.2 Mhz*/ + if (pdata->res_data->pps_lpass_conn_en) { + /*Configuring PPS0 PPS output frequency to defualt 19.2 Mhz*/ eth_pps_cfg.ppsout_ch = 0; eth_pps_cfg.ptpclk_freq = DWC_ETH_QOS_DEFAULT_PTP_CLOCK; - eth_pps_cfg.ppsout_freq = 19200000; + eth_pps_cfg.ppsout_freq = DWC_ETH_QOS_DEFAULT_LPASS_PPS_FREQUENCY; eth_pps_cfg.ppsout_start = 1; + eth_pps_cfg.ppsout_duty = 50; req.ptr = (void*)ð_pps_cfg; DWC_ETH_QOS_pps_timer_init(&req); |