[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191104204847.GB17620@lunn.ch>
Date: Mon, 4 Nov 2019 21:48:47 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Florian Fainelli <f.fainelli@...il.com>
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
> @@ -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?
Andrew
Powered by blists - more mailing lists