From: Simon Horman <simon.horman@corigine.com>
To: Shenwei Wang <shenwei.wang@nxp.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Wong Vee Khee <veekhee@apple.com>,
Kurt Kanzenbach <kurt@linutronix.de>,
Mohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>,
Andrey Konovalov <andrey.konovalov@linaro.org>,
Jochen Henneberg <jh@henneberg-systemdesign.com>,
Tan Tee Min <tee.min.tan@linux.intel.com>,
netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com, imx@lists.linux.dev
Subject: Re: [PATCH v5 2/2] net: stmmac: dwmac-imx: use platform specific reset for imx93 SoCs
Date: Mon, 3 Apr 2023 21:51:32 +0200 [thread overview]
Message-ID: <ZCsuRDDAmIj571wl@corigine.com> (raw)
In-Reply-To: <20230403152408.238530-2-shenwei.wang@nxp.com>
On Mon, Apr 03, 2023 at 10:24:08AM -0500, Shenwei Wang wrote:
> The patch addresses an issue with the reset logic on the i.MX93 SoC, which
> requires configuration of the correct interface speed under RMII mode to
> complete the reset. The patch implements a fix_soc_reset function and uses
> it specifically for the i.MX93 SoCs.
>
> Reviewed-by: Fabio Estevam <festevam@gmail.com>
> Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
> ---
> .../net/ethernet/stmicro/stmmac/dwmac-imx.c | 27 +++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
> index 2a2be65d65a0..465de3392e4e 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c
> @@ -37,10 +37,15 @@
> #define MX93_GPR_ENET_QOS_INTF_SEL_RGMII (0x1 << 1)
> #define MX93_GPR_ENET_QOS_CLK_GEN_EN (0x1 << 0)
>
> +#define DMA_BUS_MODE 0x00001000
> +#define DMA_BUS_MODE_SFT_RESET (0x1 << 0)
> +#define RMII_RESET_SPEED (0x3 << 14)
> +
> struct imx_dwmac_ops {
> u32 addr_width;
> bool mac_rgmii_txclk_auto_adj;
>
> + int (*fix_soc_reset)(void *priv, void __iomem *ioaddr);
> int (*set_intf_mode)(struct plat_stmmacenet_data *plat_dat);
> };
>
> @@ -207,6 +212,25 @@ static void imx_dwmac_fix_speed(void *priv, unsigned int speed)
> dev_err(dwmac->dev, "failed to set tx rate %lu\n", rate);
> }
>
> +static int imx_dwmac_mx93_reset(void *priv, void __iomem *ioaddr)
> +{
> + u32 value = readl(ioaddr + DMA_BUS_MODE);
> + struct plat_stmmacenet_data *plat_dat = priv;
> +
nit: reverse xmas tree - longest line to shortest - for local variable
declarations.
...
next prev parent reply other threads:[~2023-04-03 19:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 15:24 [PATCH v5 1/2] net: stmmac: add support for platform specific reset Shenwei Wang
2023-04-03 15:24 ` [PATCH v5 2/2] net: stmmac: dwmac-imx: use platform specific reset for imx93 SoCs Shenwei Wang
2023-04-03 19:51 ` Simon Horman [this message]
2023-04-03 19:49 ` [PATCH v5 1/2] net: stmmac: add support for platform specific reset Simon Horman
2023-04-03 22:16 ` [EXT] " Shenwei Wang
2023-04-04 9:34 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZCsuRDDAmIj571wl@corigine.com \
--to=simon.horman@corigine.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrey.konovalov@linaro.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=jh@henneberg-systemdesign.com \
--cc=joabreu@synopsys.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mohammad.athari.ismail@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=peppe.cavallaro@st.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=shenwei.wang@nxp.com \
--cc=tee.min.tan@linux.intel.com \
--cc=veekhee@apple.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).