Re: [PATCH v2] net: mdio-ipq4019: Fix the error for an optional regs resource
From: Andrew Lunn
Date: Tue Sep 28 2021 - 11:26:49 EST
On Tue, Sep 28, 2021 at 09:48:49PM +0800, Cai Huoqing wrote:
> The second resource is optional which is only provided on the chipset
> IPQ5018. But the blamed commit ignores that and if the resource is
> not there it just fails.
>
> the resource is used like this,
> if (priv->eth_ldo_rdy) {
> val = readl(priv->eth_ldo_rdy);
> val |= BIT(0);
> writel(val, priv->eth_ldo_rdy);
> fsleep(IPQ_PHY_SET_DELAY_US);
> }
>
> This patch reverts that to still allow the second resource to be optional
> because other SoC have the some MDIO controller and doesn't need to
> second resource.
>
> Fixes: fa14d03e014a ("net: mdio-ipq4019: Make use of devm_platform_ioremap_resource()")
> Signed-off-by: Cai Huoqing <caihuoqing@xxxxxxxxx>
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Andrew