Message ID | ffa2a75c6a88325b8b3b81a1b70130e68c59f6cf.1720512634.git.siyanteng@loongson.cn (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | stmmac: Add Loongson platform support | expand |
On Tue, Jul 09, 2024 at 05:37:01PM +0800, Yanteng Si wrote: > 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. > > Signed-off-by: Feiyang Chen <chenfeiyang@loongson.cn> > Signed-off-by: Yinggang Gu <guyinggang@loongson.cn> > Signed-off-by: Yanteng Si <siyanteng@loongson.cn> Note the maintainers may wish to get a clarification whether the patch should be qualified as a fix and backported to the stable kernels. In the later case the Fixes tag should be added with the commit hash causing the problem. Anyway. From my perspective the patch looks good. Thanks. Reviewed-by: Serge Semin <fancer.lancer@gmail.com> -Serge(y) > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c > index 9b2e4bdf7cc7..327275b28dc2 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c > @@ -35,6 +35,9 @@ static void loongson_default_data(struct plat_stmmacenet_data *plat) > /* Disable RX queues routing by default */ > plat->rx_queues_cfg[0].pkt_route = 0x0; > > + plat->clk_ref_rate = 125000000; > + plat->clk_ptp_rate = 125000000; > + > /* Default to phy auto-detection */ > plat->phy_addr = -1; > > -- > 2.31.4 >
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c index 9b2e4bdf7cc7..327275b28dc2 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c @@ -35,6 +35,9 @@ static void loongson_default_data(struct plat_stmmacenet_data *plat) /* Disable RX queues routing by default */ plat->rx_queues_cfg[0].pkt_route = 0x0; + plat->clk_ref_rate = 125000000; + plat->clk_ptp_rate = 125000000; + /* Default to phy auto-detection */ plat->phy_addr = -1;