[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4808c8d7-8f26-989b-033f-65d161e13b41@gmail.com>
Date: Mon, 4 Nov 2019 13:33:35 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org, vivien.didelot@...il.com,
davem@...emloft.net, Jakub Kicinski <jakub.kicinski@...ronome.com>
Subject: Re: [PATCH net-next 2/2] net: dsa: bcm_sf2: Add support for optional
reset controller line
On 11/4/19 12:48 PM, Andrew Lunn wrote:
>> @@ -350,6 +350,18 @@ static int bcm_sf2_sw_rst(struct bcm_sf2_priv *priv)
>> {
>> unsigned int timeout = 1000;
>> u32 reg;
>> + int ret;
>> +
>> + /* The watchdog reset does not work on 7278, we need to hit the
>> + * "external" reset line through the reset controller.
>> + */
>> + if (priv->type == BCM7278_DEVICE_ID && !IS_ERR(priv->rcdev)) {
>> + ret = reset_control_assert(priv->rcdev);
>> + if (ret)
>> + return ret;
>> +
>> + return reset_control_deassert(priv->rcdev);
>
> Hi Florian
>
> Here you do it conditional on priv->type
>
>> @@ -1223,6 +1240,8 @@ static int bcm_sf2_sw_remove(struct platform_device *pdev)
>> /* Disable all ports and interrupts */
>> bcm_sf2_sw_suspend(priv->dev->ds);
>> bcm_sf2_mdio_unregister(priv);
>> + if (!IS_ERR(priv->rcdev))
>> + reset_control_assert(priv->rcdev);
>
> And here it is unconditional. Seem a bit inconsistent. If it is in DT,
> why not use it?
That's an oversight, thanks for spotting that, v2 coming shortly.
--
Florian
Powered by blists - more mailing lists