From: Daniel Machon <daniel.machon@microchip.com>
To: <UNGLinuxDriver@microchip.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"Steen Hegelund" <Steen.Hegelund@microchip.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Richard Cochran <richardcochran@gmail.com>
Cc: <netdev@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH net-next 2/4] net: sparx5/lan969x: enable the switch core after clock setup
Date: Fri, 13 Nov 2026 11:19:41 +0100 [thread overview]
Message-ID: <20261113-lan969x-core-skew-v1-2-b9b02b863d38@microchip.com> (raw)
In-Reply-To: <20261113-lan969x-core-skew-v1-0-b9b02b863d38@microchip.com>
sparx5_init_switchcore() ends by setting HSCH_RESET_CFG.CORE_ENA, so the
switch core and queue system are already running when
sparx5_init_coreclock() configures the core clock afterwards. That is
fine for the dividers it sets on sparx5, but a later patch makes it also
program the lan969x core PLL, which should be done before the queue
system is enabled.
Move the CORE_ENA write to mchp_sparx5_probe(), right after
sparx5_init_coreclock(), so the core is enabled once its clock is set
up.
CORE_ENA also tells sparx5_init_switchcore() that the switch memories
are already initialized. The switch is only reset once, when the reset
controller probes, so after an unbind and bind CORE_ENA is still set
and the core clock is configured with the queue system running.
Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
---
drivers/net/ethernet/microchip/sparx5/sparx5_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
index 68c80c63f9087..93a7cb89493c4 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
@@ -471,9 +471,6 @@ static int sparx5_init_switchcore(struct sparx5 *sparx5)
spx5_wr(ANA_AC_STAT_RESET_RESET_SET(1), sparx5, ANA_AC_STAT_RESET);
spx5_wr(ASM_STAT_CFG_STAT_CNT_CLR_SHOT_SET(1), sparx5, ASM_STAT_CFG);
- /* Enable switch-core and queue system */
- spx5_wr(HSCH_RESET_CFG_CORE_ENA_SET(1), sparx5, HSCH_RESET_CFG);
-
return 0;
}
@@ -928,6 +925,9 @@ static int mchp_sparx5_probe(struct platform_device *pdev)
goto cleanup_config;
}
+ /* Enable switch-core and queue system */
+ spx5_wr(HSCH_RESET_CFG_CORE_ENA_SET(1), sparx5, HSCH_RESET_CFG);
+
for (idx = 0; idx < sparx5->port_count; ++idx) {
config = &configs[idx];
if (!config->node)
--
2.34.1
next prev parent reply other threads:[~2026-11-13 10:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 10:19 [PATCH net-next 0/4] net: lan969x: skew the core clock by 200 ppm Daniel Machon
2026-11-13 10:19 ` [PATCH net-next 1/4] net: lan969x: add the core PLL registers Daniel Machon
2026-11-13 10:19 ` Daniel Machon [this message]
2026-11-13 10:19 ` [PATCH net-next 3/4] net: lan969x: configure the core PLL Daniel Machon
2026-11-16 13:22 ` netdev-bot+sashiko
2026-11-16 14:02 ` Daniel Machon
2026-11-13 10:19 ` [PATCH net-next 4/4] net: sparx5/lan969x: scale the nominal TOD increment in adjfine Daniel Machon
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=20261113-lan969x-core-skew-v1-2-b9b02b863d38@microchip.com \
--to=daniel.machon@microchip.com \
--cc=Steen.Hegelund@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.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
all inboxes | Powered by JetHome®