diff options
-rw-r--r-- | drivers/spi/spi-fsl-dspi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index 4b6032dd0990..5fe54cda309f 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -155,6 +155,8 @@ static void hz_to_spi_baud(char *pbr, char *br, int speed_hz, int i, j; scale_needed = clkrate / speed_hz; + if (clkrate % speed_hz) + scale_needed++; for (i = 0; i < ARRAY_SIZE(brs); i++) for (j = 0; j < ARRAY_SIZE(pbr_tbl); j++) { |