[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+V-a8sS0TtS-TEdkQ8MB5F4JtzV9358Y9fmKe5MggGU+wP=4Q@mail.gmail.com>
Date: Mon, 14 Apr 2025 19:14:42 +0100
From: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>, Alexandre Torgue <alexandre.torgue@...s.st.com>,
Richard Cochran <richardcochran@...il.com>, Philipp Zabel <p.zabel@...gutronix.de>,
Geert Uytterhoeven <geert+renesas@...der.be>, Magnus Damm <magnus.damm@...il.com>,
Giuseppe Cavallaro <peppe.cavallaro@...com>, Jose Abreu <joabreu@...opsys.com>, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-renesas-soc@...r.kernel.org,
Biju Das <biju.das.jz@...renesas.com>,
Fabrizio Castro <fabrizio.castro.jz@...esas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [PATCH net-next v5 3/3] net: stmmac: Add DWMAC glue layer for
Renesas GBETH
Hi Russell,
On Mon, Apr 14, 2025 at 5:57 PM Russell King (Oracle)
<linux@...linux.org.uk> wrote:
>
> On Mon, Apr 07, 2025 at 01:03:17PM +0100, Prabhakar wrote:
> > + gbeth->rstc = devm_reset_control_get_exclusive(dev, NULL);
> > + if (IS_ERR(gbeth->rstc))
> > + return PTR_ERR(gbeth->rstc);
> > +
> > + gbeth->dev = dev;
> > + gbeth->regs = stmmac_res.addr;
> > + gbeth->plat_dat = plat_dat;
> > + plat_dat->bsp_priv = gbeth;
> > + plat_dat->set_clk_tx_rate = stmmac_set_clk_tx_rate;
> > + plat_dat->clks_config = renesas_gbeth_clks_config;
> > + plat_dat->flags |= STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY |
> > + STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP |
> > + STMMAC_FLAG_SPH_DISABLE;
> > +
> > + err = renesas_gbeth_clks_config(gbeth, true);
> > + if (err)
> > + return err;
> > +
> > + err = stmmac_dvr_probe(dev, plat_dat, &stmmac_res);
> > + if (err)
> > + renesas_gbeth_clks_config(gbeth, false);
> > +
> > + return err;
> > +}
> > +
> > +static void renesas_gbeth_remove(struct platform_device *pdev)
> > +{
> > + stmmac_dvr_remove(&pdev->dev);
> > +
> > + renesas_gbeth_clks_config(get_stmmac_bsp_priv(&pdev->dev), false);
> > +}
>
> Would calling renesas_gbeth_clks_config() in the suspend/resume paths
> cause problems?
>
> If not, please consider using plat_dat->init() and plat_dat->exit()
> to control these clocks, and then use devm_stmmac_pltfr_probe()
> which will call the ->init and ->exit functions around the probe
> as necessary and at removal time (and you won't need the remove
> method.)
>
I'll test this on the platform which can support suspend/resume and
update accordingly.
Cheers,
Prabhakar
Powered by blists - more mailing lists