]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: lan969x: add function for calculating the DSM calendar
authorDaniel Machon <daniel.machon@microchip.com>
Wed, 23 Oct 2024 22:01:30 +0000 (00:01 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 31 Oct 2024 01:08:06 +0000 (18:08 -0700)
commit5d2ba3941016c61093f2d6d986692bc39d000023
treeb70975cb4de6b30cbc46aec203bb9dc541f6f510
parent24fe835417559b0cb185a508941831e8cf2c2d3c
net: lan969x: add function for calculating the DSM calendar

Lan969x has support for RedBox / HSR / PRP (not implemented yet). In
order to accommodate for this in the future, we need to give lan969x it's
own function for calculating the DSM calendar.

The function calculates the calendar for each taxi bus. The calendar is
used for bandwidth allocation towards the ports attached to the taxi
bus. A calendar configuration consists of up-to 64 slots, which may be
allocated to ports or left unused. Each slot accounts for 1 clock cycle.

Also expose sparx5_cal_speed_to_value(), sparx5_get_port_cal_speed,
sparx5_cal_bw and SPX5_DSM_CAL_EMPTY for use by lan969x.

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-11-a0b5fae88a0f@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microchip/lan969x/Makefile
drivers/net/ethernet/microchip/lan969x/lan969x.c
drivers/net/ethernet/microchip/lan969x/lan969x.h
drivers/net/ethernet/microchip/lan969x/lan969x_calendar.c [new file with mode: 0644]
drivers/net/ethernet/microchip/sparx5/sparx5_calendar.c
drivers/net/ethernet/microchip/sparx5/sparx5_main.h