[PATCH 1/3] net: ethernet: stmmac: dwmac-rk: Disable delayline if it is invalid
Sebastian Reichel
sebastian.reichel at collabora.com
Fri Jun 24 09:29:56 PDT 2022
Hi,
On Fri, Jun 24, 2022 at 01:18:53PM +0200, Andrew Lunn wrote:
> > @@ -1422,7 +1420,7 @@ static struct rk_priv_data *rk_gmac_setup(struct platform_device *pdev,
> >
> > ret = of_property_read_u32(dev->of_node, "tx_delay", &value);
> > if (ret) {
> > - bsp_priv->tx_delay = 0x30;
> > + bsp_priv->tx_delay = -1;
> > dev_err(dev, "Can not read property: tx_delay.");
> > dev_err(dev, "set tx_delay to 0x%x\n",
> > bsp_priv->tx_delay);
> > @@ -1433,7 +1431,7 @@ static struct rk_priv_data *rk_gmac_setup(struct platform_device *pdev,
> >
> > ret = of_property_read_u32(dev->of_node, "rx_delay", &value);
> > if (ret) {
> > - bsp_priv->rx_delay = 0x10;
> > + bsp_priv->rx_delay = -1;
> > dev_err(dev, "Can not read property: rx_delay.");
> > dev_err(dev, "set rx_delay to 0x%x\n",
> > bsp_priv->rx_delay);
>
> rockchip-dwmac.yaml says:
>
> tx_delay:
> description: Delay value for TXD timing. Range value is 0~0x7F, 0x30 as default.
> $ref: /schemas/types.yaml#/definitions/uint32
>
> rx_delay:
> description: Delay value for RXD timing. Range value is 0~0x7F, 0x10 as default.
> $ref: /schemas/types.yaml#/definitions/uint32
>
> So it seems to me you are changing the documented default. You cannot
> do that, this is ABI.
Right. I suppose we either need a disable value or an extra property. I
can add support for supplying (-1) from DT. Does that sounds ok to
everyone?
-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220624/06a50890/attachment-0001.sig>
More information about the linux-arm-kernel
mailing list