Skip to content

Commit 9f31828

Browse files
jerome-pouillerasmellby
authored andcommitted
drivers: spi: siwx91x: clk_div_factor can't be 0
In gspi_siwx91x_config(), clk_div_factor can't be < 1. Therefore, we can remove the dead code. This code has been tested with tests/drivers/spi/spi_loopback, with a PLL clock configured to 160MHz and a bus clock to 80MHz with success. I have not found the case where change in GSPI_CLK_CONFIG are required. Signed-off-by: Jérôme Pouiller <[email protected]> Upstream-status: pr <zephyrproject-rtos#100762>
1 parent cfa6d85 commit 9f31828

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/spi/spi_silabs_siwx91x_gspi.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,6 @@ static int gspi_siwx91x_config(const struct device *dev, const struct spi_config
151151
}
152152
}
153153

154-
if (clk_div_factor < 1) {
155-
cfg->reg->GSPI_CLK_CONFIG_b.GSPI_CLK_EN = 1;
156-
cfg->reg->GSPI_CLK_CONFIG_b.GSPI_CLK_SYNC = 1;
157-
}
158-
159154
/* Set the clock divider factor */
160155
cfg->reg->GSPI_CLK_DIV = clk_div_factor;
161156

0 commit comments

Comments
 (0)