mpfs_corespi: Fix DEBUGASSERT() for clk divider
Valid range is 0...255, not 2...512
This commit is contained in:
parent
4c9e11d559
commit
4d49f80e16
@ -540,7 +540,7 @@ static uint32_t mpfs_spi_setfrequency(struct spi_dev_s *dev,
|
||||
divider = ((MPFS_FPGA_PERIPHERAL_CLK / frequency) >> 1) - 1;
|
||||
priv->actual = MPFS_FPGA_PERIPHERAL_CLK / ((divider + 1) << 1);
|
||||
|
||||
DEBUGASSERT(divider >= 2u && divider <= 512u);
|
||||
DEBUGASSERT(divider < 256u);
|
||||
|
||||
putreg32(divider, MPFS_SPI_CLK_GEN);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user