Message ID | b6c038eb4daa00760a484692b192957d3ac574db.1716973237.git.siyanteng@loongson.cn (mailing list archive) |
---|---|
State | Deferred |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | stmmac: Add Loongson platform support | expand |
On Wed, May 29, 2024 at 06:19:47PM +0800, Yanteng Si wrote: > The phy_interface of gmac is PHY_INTERFACE_MODE_RGMII_ID. It's better to translate this to a normal sentence: "PHY-interface of the Loongson GMAC device is RGMII with no internal delays added to the data lines signal. So to comply with that let's pre-initialize the platform-data field with the respective enum constant." -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 | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c > index e725c59c6c98..0289956e274b 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c > @@ -49,6 +49,8 @@ static int loongson_gmac_data(struct plat_stmmacenet_data *plat) > { > loongson_default_data(plat); > > + plat->phy_interface = PHY_INTERFACE_MODE_RGMII_ID; > + > return 0; > } > > -- > 2.31.4 >
在 2024/7/2 16:43, Serge Semin 写道: > On Wed, May 29, 2024 at 06:19:47PM +0800, Yanteng Si wrote: >> The phy_interface of gmac is PHY_INTERFACE_MODE_RGMII_ID. > It's better to translate this to a normal sentence: > "PHY-interface of the Loongson GMAC device is RGMII with no internal > delays added to the data lines signal. So to comply with that let's > pre-initialize the platform-data field with the respective enum > constant." > OK. Thanks! Thanks, Yanteng
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c index e725c59c6c98..0289956e274b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c @@ -49,6 +49,8 @@ static int loongson_gmac_data(struct plat_stmmacenet_data *plat) { loongson_default_data(plat); + plat->phy_interface = PHY_INTERFACE_MODE_RGMII_ID; + return 0; }