Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

phy: sparx5-serdes: add constant for the number of CMU's

The number of CMU's differ for Sparx5 and lan969x, so add a new field:
cmu_max and use it throughout.

Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>
Link: https://lore.kernel.org/r/20240909-sparx5-lan969x-serdes-driver-v2-3-d695bcb57b84@microchip.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Daniel Machon and committed by
Vinod Koul
5206ba96 8e65baf8

+3 -3
+2 -3
drivers/phy/microchip/sparx5_serdes.c
··· 21 21 22 22 #include "sparx5_serdes.h" 23 23 24 - #define SPX5_CMU_MAX 14 25 - 26 24 #define SPX5_SERDES_10G_START 13 27 25 #define SPX5_SERDES_25G_START 25 28 26 #define SPX5_SERDES_6G10G_CNT SPX5_SERDES_25G_START ··· 1099 1101 int i; 1100 1102 1101 1103 /* Power down each CMU */ 1102 - for (i = 0; i < SPX5_CMU_MAX; i++) { 1104 + for (i = 0; i < priv->data->consts.cmu_max; i++) { 1103 1105 cmu_inst = sdx5_inst_get(priv, TARGET_SD_CMU, i); 1104 1106 cmu_cfg_inst = sdx5_inst_get(priv, TARGET_SD_CMU_CFG, i); 1105 1107 ··· 2510 2512 .iomap_size = ARRAY_SIZE(sparx5_serdes_iomap), 2511 2513 .consts = { 2512 2514 .sd_max = 33, 2515 + .cmu_max = 14, 2513 2516 }, 2514 2517 }; 2515 2518
+1
drivers/phy/microchip/sparx5_serdes.h
··· 28 28 29 29 struct sparx5_serdes_consts { 30 30 int sd_max; 31 + int cmu_max; 31 32 }; 32 33 33 34 struct sparx5_serdes_match_data {