Message ID | aa9e291e181017146f88238cdeec9f18759915c3.1714046812.git.siyanteng@loongson.cn (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | stmmac: Add Loongson platform support | expand |
> [PATCH net-next v12 07/15] net: stmmac: dwmac-loongson: Add ref and ptp clocks for Loongson s/ptp/PTP Mentioning Loongson is redundant. Just: net: stmmac: dwmac-loongson: Init ref and PTP clocks rate On Thu, Apr 25, 2024 at 09:06:10PM +0800, Yanteng Si wrote: > The ref/ptp clock of gmac(amd gnet) is 125000000. What about a log like this? "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." -Serge(y) > > Signed-off-by: Feiyang Chen <chenfeiyang@loongson.cn> > Signed-off-by: Yinggang Gu <guyinggang@loongson.cn> > Signed-off-by: Yanteng Si <siyanteng@loongson.cn> > --- > 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 904e288d0be0..9f208f84c1e7 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c > @@ -32,6 +32,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 >
在 2024/5/4 02:21, Serge Semin 写道: >> [PATCH net-next v12 07/15] net: stmmac: dwmac-loongson: Add ref and ptp clocks for Loongson > s/ptp/PTP > > Mentioning Loongson is redundant. Just: > > net: stmmac: dwmac-loongson: Init ref and PTP clocks rate OK. >> The ref/ptp clock of gmac(amd gnet) is 125000000. > What about a log like this? > > "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." Great! Thanks, Yanteng
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c index 904e288d0be0..9f208f84c1e7 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c @@ -32,6 +32,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;