RE: [PATCH V2 net-next 5/7] net: fec: add MAC internal delayed clock feature support

From: Joakim Zhang
Date: Wed Jul 28 2021 - 22:32:09 EST



> -----Original Message-----
> From: Andrew Lunn <andrew@xxxxxxx>
> Sent: 2021年7月28日 22:11
> To: Joakim Zhang <qiangqing.zhang@xxxxxxx>
> Cc: davem@xxxxxxxxxxxxx; kuba@xxxxxxxxxx; robh+dt@xxxxxxxxxx;
> shawnguo@xxxxxxxxxx; s.hauer@xxxxxxxxxxxxxx; kernel@xxxxxxxxxxxxxx;
> festevam@xxxxxxxxx; dl-linux-imx <linux-imx@xxxxxxx>;
> netdev@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx;
> linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH V2 net-next 5/7] net: fec: add MAC internal delayed clock
> feature support
>
> > + /* For rgmii internal delay, valid values are 0ps and 2000ps */
> > + if (of_property_read_u32(np, "tx-internal-delay-ps", &rgmii_delay))
> > + fep->rgmii_txc_dly = true;
> > + if (of_property_read_u32(np, "rx-internal-delay-ps", &rgmii_delay))
> > + fep->rgmii_rxc_dly = true;
>
> I don't see any validation of the only supported values are 0ps and 2000ps.

Hi Andrew,

I also take this into account, since I have limited the value to 0 and 2000 in fec dt-bindings.
It will report error when run dtbs_check if value is not invalid. Another reason is that actually
the value is not program to hardware, we only enable RGMII delay or not. If need, I think we
can only add a dev_warn() here, instead of stop the probe process?

Best Regards,
Joakim Zhang
> Andrew