Skip to content

Commit 31c79c2

Browse files
Yanteng Sigregkh
authored andcommitted
net: stmmac: dwmac-loongson: Init ref and PTP clocks rate
[ Upstream commit c70f316 ] Reference and PTP clocks rate of the Loongson GMAC devices is 125MHz. (So is in the GNET devices which support is about to be added.) Set the respective plat_stmmacenet_data field up in accordance with that so to have the coalesce command and timestamping work correctly. Fixes: 30bba69 ("stmmac: pci: Add dwmac support for Loongson") Signed-off-by: Feiyang Chen <chenfeiyang@loongson.cn> Signed-off-by: Yinggang Gu <guyinggang@loongson.cn> Reviewed-by: Serge Semin <fancer.lancer@gmail.com> Acked-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Yanteng Si <siyanteng@loongson.cn> Tested-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 5c42a30 commit 31c79c2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ static int loongson_default_data(struct plat_stmmacenet_data *plat)
3535
/* Disable RX queues routing by default */
3636
plat->rx_queues_cfg[0].pkt_route = 0x0;
3737

38+
plat->clk_ref_rate = 125000000;
39+
plat->clk_ptp_rate = 125000000;
40+
3841
/* Default to phy auto-detection */
3942
plat->phy_addr = -1;
4043

0 commit comments

Comments
 (0)