net: stmmac: configure PTP clock source prior to PTP initialization
authorMohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
Wed, 26 Jan 2022 09:47:22 +0000 (17:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Feb 2022 16:26:58 +0000 (17:26 +0100)
commit9ef5a86d447a87e91295784cf917be6ef390a80b
tree1c9015bfd9e81f254b0c38861c744c34916cc78d
parent30705f1f012ccd2232dade49cabac894d34580da
net: stmmac: configure PTP clock source prior to PTP initialization

commit 94c82de43e01ef5747a95e4a590880de863fe423 upstream.

For Intel platform, it is required to configure PTP clock source prior PTP
initialization in MAC. So, need to move ptp_clk_freq_config execution from
stmmac_ptp_register() to stmmac_init_ptp().

Fixes: 76da35dc99af ("stmmac: intel: Add PSE and PCH PTP clock source selection")
Cc: <stable@vger.kernel.org> # 5.15.x
Signed-off-by: Mohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c