diff options
author | Jim Liu <jim.t90615@gmail.com> | 2023-12-26 10:00:06 +0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-12-26 14:41:46 -0500 |
commit | f03e3f0b8b2275733d5e299efedaecce42b3db31 (patch) | |
tree | b028b6ffd8eb4e8601072729c5d2b294e3a93dfd | |
parent | 2c9ee3f22603083ef0c4b808cf92645e5417156a (diff) | |
download | u-boot-f03e3f0b8b2275733d5e299efedaecce42b3db31.tar.gz |
spi: npcm_pspi: Fix the wrong clock divider calculation
Fix the wrong clock divider calculation.
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
-rw-r--r-- | drivers/spi/npcm_pspi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/npcm_pspi.c b/drivers/spi/npcm_pspi.c index 37bab70967..eb14185273 100644 --- a/drivers/spi/npcm_pspi.c +++ b/drivers/spi/npcm_pspi.c @@ -144,7 +144,7 @@ static int npcm_pspi_set_speed(struct udevice *bus, uint speed) if (speed > priv->max_hz) speed = priv->max_hz; - divisor = DIV_ROUND_CLOSEST(apb_clock, (2 * speed) - 1); + divisor = DIV_ROUND_CLOSEST(apb_clock, (2 * speed)) - 1; if (divisor > MAX_DIV) divisor = MAX_DIV; |