]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: sparx5: change frequency calculation for SDLB's
authorDaniel Machon <daniel.machon@microchip.com>
Wed, 23 Oct 2024 22:01:22 +0000 (00:01 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 31 Oct 2024 01:08:05 +0000 (18:08 -0700)
commit728267dc46d3bbb21bf9431ecbb6c8e9251cd711
treef574b30edf821833494d433a8468eb276549b39e
parent9324881cef519acee1d7b187fd9ed0f92fb28fe2
net: sparx5: change frequency calculation for SDLB's

In preparation for lan969x, rework the function that calculates the SDLB
(Service Dual Leacky Bucket) clock. This is required, as the
HSCH_SYS_CLK_PER register is Sparx5-exclusive. Instead derive the clock
from the core clock, using the sparx5_clk_period() function. The clock
stays the same before and after this patch, only now,
sparx5_sdlb_clk_hz_get() can be used for lan969x too.

Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>
Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://patch.msgid.link/20241024-sparx5-lan969x-switch-driver-2-v2-3-a0b5fae88a0f@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microchip/sparx5/sparx5_main.h
drivers/net/ethernet/microchip/sparx5/sparx5_sdlb.c