net: sparx5: change spx5_wr to spx5_rmw in cal update()
In preparation for lan969x, use spx5_rmw() for enabling the update of the calendar. This is required to not overwrite the DSM_TAXI_CAL_CFG register, as an additional write will be added before this one, in a subsequent patch. 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-2-a0b5fae88a0f@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
1ebaa5e189
commit
9324881cef
@@ -546,9 +546,10 @@ static int sparx5_dsm_calendar_update(struct sparx5 *sparx5, u32 taxi,
|
||||
u32 idx;
|
||||
u32 cal_len = sparx5_dsm_cal_len(data->schedule), len;
|
||||
|
||||
spx5_wr(DSM_TAXI_CAL_CFG_CAL_PGM_ENA_SET(1),
|
||||
sparx5,
|
||||
DSM_TAXI_CAL_CFG(taxi));
|
||||
spx5_rmw(DSM_TAXI_CAL_CFG_CAL_PGM_ENA_SET(1),
|
||||
DSM_TAXI_CAL_CFG_CAL_PGM_ENA,
|
||||
sparx5,
|
||||
DSM_TAXI_CAL_CFG(taxi));
|
||||
for (idx = 0; idx < cal_len; idx++) {
|
||||
spx5_rmw(DSM_TAXI_CAL_CFG_CAL_IDX_SET(idx),
|
||||
DSM_TAXI_CAL_CFG_CAL_IDX,
|
||||
@@ -559,9 +560,10 @@ static int sparx5_dsm_calendar_update(struct sparx5 *sparx5, u32 taxi,
|
||||
sparx5,
|
||||
DSM_TAXI_CAL_CFG(taxi));
|
||||
}
|
||||
spx5_wr(DSM_TAXI_CAL_CFG_CAL_PGM_ENA_SET(0),
|
||||
sparx5,
|
||||
DSM_TAXI_CAL_CFG(taxi));
|
||||
spx5_rmw(DSM_TAXI_CAL_CFG_CAL_PGM_ENA_SET(0),
|
||||
DSM_TAXI_CAL_CFG_CAL_PGM_ENA,
|
||||
sparx5,
|
||||
DSM_TAXI_CAL_CFG(taxi));
|
||||
len = DSM_TAXI_CAL_CFG_CAL_CUR_LEN_GET(spx5_rd(sparx5,
|
||||
DSM_TAXI_CAL_CFG(taxi)));
|
||||
if (len != cal_len - 1)
|
||||
|
||||
Reference in New Issue
Block a user