[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <32a2d3d7f95a4f865ce4b49b4f8246587be48128.camel@pengutronix.de>
Date: Mon, 25 Nov 2024 11:27:15 +0100
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Jacky Chou <jacky_chou@...eedtech.com>, andrew+netdev@...n.ch,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org, ratbert@...aday-tech.com, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v3 3/7] net: ftgmac100: Add reset toggling for
Aspeed SOCs
On Mi, 2024-11-20 at 15:50 +0800, Jacky Chou wrote:
> Toggle the SCU reset before hardware initialization.
>
> Signed-off-by: Jacky Chou <jacky_chou@...eedtech.com>
> ---
> drivers/net/ethernet/faraday/ftgmac100.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
> index 17ec35e75a65..1840f7089676 100644
> --- a/drivers/net/ethernet/faraday/ftgmac100.c
> +++ b/drivers/net/ethernet/faraday/ftgmac100.c
> @@ -9,6 +9,7 @@
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>
> #include <linux/clk.h>
> +#include <linux/reset.h>
> #include <linux/dma-mapping.h>
> #include <linux/etherdevice.h>
> #include <linux/ethtool.h>
> @@ -98,6 +99,7 @@ struct ftgmac100 {
> struct work_struct reset_task;
> struct mii_bus *mii_bus;
> struct clk *clk;
> + struct reset_control *rst;
>
> /* AST2500/AST2600 RMII ref clock gate */
> struct clk *rclk;
> @@ -1979,6 +1981,24 @@ static int ftgmac100_probe(struct platform_device *pdev)
> priv->base + FTGMAC100_OFFSET_TM);
> }
>
> + priv->rst = devm_reset_control_get_optional_exclusive(priv->dev, NULL);
> + if (IS_ERR(priv->rst))
> + goto err_register_netdev;
> + if (!priv->rst)
> + dev_info(&pdev->dev, "no reset control found\n");
Am I understanding correctly that the aspeed-g4 to g6 platforms don't
have the reset? If so, this message is unnecessary noise on those
platforms.
regards
Philipp
Powered by blists - more mailing lists