diff options
| author | Jim Liu <[email protected]> | 2023-12-26 10:00:06 +0800 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-12-26 14:41:46 -0500 |
| commit | f03e3f0b8b2275733d5e299efedaecce42b3db31 (patch) | |
| tree | b028b6ffd8eb4e8601072729c5d2b294e3a93dfd | |
| parent | 2c9ee3f22603083ef0c4b808cf92645e5417156a (diff) | |
spi: npcm_pspi: Fix the wrong clock divider calculation
Fix the wrong clock divider calculation.
Signed-off-by: Jim Liu <[email protected]>
| -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 37bab709672..eb14185273e 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; |
