From: Dragan Simic <dsimic@manjaro.org>
To: Jonas Karlman <jonas@kwiboo.se>
Cc: Heiko Stuebner <heiko@sntech.de>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
David Wu <david.wu@rock-chips.com>,
Sebastian Reichel <sebastian.reichel@collabora.com>,
netdev@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH 3/3] net: stmmac: dwmac-rk: Use DELAY_ENABLE macro for RK3588
Date: Thu, 06 Mar 2025 22:33:23 +0100 [thread overview]
Message-ID: <8323ba9aba1155004bcd201b4fd7b2fa@manjaro.org> (raw)
In-Reply-To: <20250306203858.1677595-4-jonas@kwiboo.se>
Hello Jonas,
On 2025-03-06 21:38, Jonas Karlman wrote:
> Support for Rockchip RK3588 GMAC was added without use of the
> DELAY_ENABLE macro to assist with enable/disable use of MAC rx/tx
> delay.
>
> Change to use a variant of the DELAY_ENABLE macro to help disable MAC
> delay when RGMII_ID/RXID/TXID is used.
>
> Fixes: 2f2b60a0ec28 ("net: ethernet: stmmac: dwmac-rk: Add gmac
> support for rk3588")
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
> b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
> index 37eb86e4e325..79db81d68afd 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
> @@ -91,6 +91,10 @@ struct rk_priv_data {
> (((tx) ? soc##_GMAC_TXCLK_DLY_ENABLE : soc##_GMAC_TXCLK_DLY_DISABLE)
> | \
> ((rx) ? soc##_GMAC_RXCLK_DLY_ENABLE : soc##_GMAC_RXCLK_DLY_DISABLE))
>
> +#define DELAY_ENABLE_BY_ID(soc, tx, rx, id) \
> + (((tx) ? soc##_GMAC_TXCLK_DLY_ENABLE(id) :
> soc##_GMAC_TXCLK_DLY_DISABLE(id)) | \
> + ((rx) ? soc##_GMAC_RXCLK_DLY_ENABLE(id) :
> soc##_GMAC_RXCLK_DLY_DISABLE(id)))
> +
> #define PX30_GRF_GMAC_CON1 0x0904
>
> /* PX30_GRF_GMAC_CON1 */
> @@ -1322,8 +1326,7 @@ static void rk3588_set_to_rgmii(struct
> rk_priv_data *bsp_priv,
> RK3588_GMAC_CLK_RGMII_MODE(id));
>
> regmap_write(bsp_priv->grf, RK3588_GRF_GMAC_CON7,
> - RK3588_GMAC_RXCLK_DLY_ENABLE(id) |
> - RK3588_GMAC_TXCLK_DLY_ENABLE(id));
> + DELAY_ENABLE_BY_ID(RK3588, tx_delay, rx_delay, id));
>
> regmap_write(bsp_priv->grf, offset_con,
> RK3588_GMAC_CLK_RX_DL_CFG(rx_delay) |
Thanks for this patch... It's looking good to me, and good job
spotting this issue! Please, free to include:
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
next prev parent reply other threads:[~2025-03-06 21:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 20:38 [PATCH 0/3] Use DELAY_ENABLE macro for RK3328, RK3566/RK3568 and RK3588 Jonas Karlman
2025-03-06 20:38 ` [PATCH 1/3] net: stmmac: dwmac-rk: Use DELAY_ENABLE macro for RK3328 Jonas Karlman
2025-03-06 21:09 ` Dragan Simic
2025-03-06 22:25 ` Andrew Lunn
2025-03-06 23:28 ` Jonas Karlman
2025-03-07 13:52 ` Andrew Lunn
2025-03-06 20:38 ` [PATCH 2/3] net: stmmac: dwmac-rk: Use DELAY_ENABLE macro for RK3566/RK3568 Jonas Karlman
2025-03-06 21:26 ` Dragan Simic
2025-03-06 20:38 ` [PATCH 3/3] net: stmmac: dwmac-rk: Use DELAY_ENABLE macro for RK3588 Jonas Karlman
2025-03-06 21:33 ` Dragan Simic [this message]
2025-03-07 0:48 ` Sebastian Reichel
2025-03-06 21:41 ` [PATCH 0/3] Use DELAY_ENABLE macro for RK3328, RK3566/RK3568 and RK3588 Dragan Simic
2025-03-06 22:07 ` Jonas Karlman
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=8323ba9aba1155004bcd201b4fd7b2fa@manjaro.org \
--to=dsimic@manjaro.org \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=david.wu@rock-chips.com \
--cc=edumazet@google.com \
--cc=heiko@sntech.de \
--cc=jonas@kwiboo.se \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sebastian.reichel@collabora.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