[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+V-a8tu-9gu_Rm3TGeGPjO48tpUVYu+PR7K9FyUU6DORQYQYg@mail.gmail.com>
Date: Wed, 16 Apr 2025 12:24:48 +0100
From: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
To: Biju Das <biju.das.jz@...renesas.com>
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>,
"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>, Giuseppe Cavallaro <peppe.cavallaro@...com>,
Jose Abreu <joabreu@...opsys.com>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-renesas-soc@...r.kernel.org" <linux-renesas-soc@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-stm32@...md-mailman.stormreply.com" <linux-stm32@...md-mailman.stormreply.com>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>,
Fabrizio Castro <fabrizio.castro.jz@...esas.com>,
Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [PATCH net-next v7 3/4] net: stmmac: Add DWMAC glue layer for
Renesas GBETH
Hi Biju,
Thank you for the review.
On Wed, Apr 16, 2025 at 11:44 AM Biju Das <biju.das.jz@...renesas.com> wrote:
>
> Hi Prabhakar,
>
> Thanks for the patch.
>
> > -----Original Message-----
> > From: Prabhakar <prabhakar.csengg@...il.com>
> > Sent: 16 April 2025 11:40
> > Subject: [PATCH net-next v7 3/4] net: stmmac: Add DWMAC glue layer for Renesas GBETH
> >
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> >
> > Add the DWMAC glue layer for the GBETH IP found in the Renesas RZ/V2H(P) SoC.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> > Reviewed-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
> > ---
> > drivers/net/ethernet/stmicro/stmmac/Kconfig | 11 ++
> > drivers/net/ethernet/stmicro/stmmac/Makefile | 1 +
> > .../stmicro/stmmac/dwmac-renesas-gbeth.c | 146 ++++++++++++++++++
> > 3 files changed, 158 insertions(+)
> > create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c
> >
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/Kconfig b/drivers/net/ethernet/stmicro/stmmac/Kconfig
> > index 3c820ef56775..2c99b23f0faa 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/Kconfig
> > +++ b/drivers/net/ethernet/stmicro/stmmac/Kconfig
> > @@ -131,6 +131,17 @@ config DWMAC_QCOM_ETHQOS
> > This selects the Qualcomm ETHQOS glue layer support for the
> > stmmac device driver.
> >
> > +config DWMAC_RENESAS_GBETH
> > + tristate "Renesas RZ/V2H(P) GBETH support"
> > + default ARCH_RENESAS
> > + depends on OF && (ARCH_RENESAS || COMPILE_TEST)
> > + help
> > + Support for Gigabit Ethernet Interface (GBETH) on Renesas
> > + RZ/V2H(P) SoCs.
> > +
> > + This selects the Renesas RZ/V2H(P) Soc specific glue layer support
> > + for the stmmac device driver.
> > +
> > config DWMAC_ROCKCHIP
> > tristate "Rockchip dwmac support"
> > default ARCH_ROCKCHIP
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/Makefile
> > b/drivers/net/ethernet/stmicro/stmmac/Makefile
> > index 594883fb4164..91050215511b 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/Makefile
> > +++ b/drivers/net/ethernet/stmicro/stmmac/Makefile
> > @@ -20,6 +20,7 @@ obj-$(CONFIG_DWMAC_LPC18XX) += dwmac-lpc18xx.o
> > obj-$(CONFIG_DWMAC_MEDIATEK) += dwmac-mediatek.o
> > obj-$(CONFIG_DWMAC_MESON) += dwmac-meson.o dwmac-meson8b.o
> > obj-$(CONFIG_DWMAC_QCOM_ETHQOS) += dwmac-qcom-ethqos.o
> > +obj-$(CONFIG_DWMAC_RENESAS_GBETH) += dwmac-renesas-gbeth.o
> > obj-$(CONFIG_DWMAC_ROCKCHIP) += dwmac-rk.o
> > obj-$(CONFIG_DWMAC_RZN1) += dwmac-rzn1.o
> > obj-$(CONFIG_DWMAC_S32) += dwmac-s32.o
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c
> > b/drivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c
> > new file mode 100644
> > index 000000000000..f34bec7794e2
> > --- /dev/null
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c
> > @@ -0,0 +1,146 @@
> > +// SPDX-License-Identifier: GPL-2.0+
> > +/*
> > + * dwmac-renesas-gbeth.c - DWMAC Specific Glue layer for Renesas GBETH
> > + *
> > + * The Rx and Tx clocks are supplied as follows for the GBETH IP.
> > + *
> > + * Rx / Tx
> > + * -------+------------- on / off -------
> > + * |
> > + * | Rx-180 / Tx-180
> > + * +---- not ---- on / off -------
> > + *
> > + * Copyright (C) 2025 Renesas Electronics Corporation */
> > +
> > +#include <linux/clk.h>
> > +#include <linux/device.h>
> > +#include <linux/module.h>
> > +#include <linux/platform_device.h>
> > +#include <linux/reset.h>
> > +
> > +#include "stmmac_platform.h"
> > +
> > +struct renesas_gbeth {
> > + struct plat_stmmacenet_data *plat_dat;
> > + struct reset_control *rstc;
> > + struct device *dev;
> > +};
> > +
> > +static const char *const renesas_gbeth_clks[] = {
> > + "tx", "tx-180", "rx", "rx-180",
> > +};
> > +
> > +static int renesas_gbeth_init(struct platform_device *pdev, void *priv)
> > +{
> > + struct plat_stmmacenet_data *plat_dat;
> > + struct renesas_gbeth *gbeth = priv;
> > + int ret;
> > +
> > + plat_dat = gbeth->plat_dat;
> > +
> > + ret = reset_control_deassert(gbeth->rstc);
> > + if (ret) {
> > + dev_err(gbeth->dev, "Reset deassert failed\n");
> > + return ret;
> > + }
> > +
> > + ret = clk_bulk_prepare_enable(plat_dat->num_clks,
> > + plat_dat->clks);
> > + if (ret)
> > + reset_control_assert(gbeth->rstc);
> > +
> > + return 0;
>
> return ret??
>
Indeed I missed it.
Cheers,
Prabhakar
Powered by blists - more mailing lists