git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c9ee3f
)
spi: npcm_pspi: Fix the wrong clock divider calculation
author
Jim Liu
<jim.t90615@gmail.com>
Tue, 26 Dec 2023 02:00:06 +0000
(10:00 +0800)
committer
Tom Rini
<trini@konsulko.com>
Tue, 26 Dec 2023 19:41:46 +0000
(14:41 -0500)
Fix the wrong clock divider calculation.
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
drivers/spi/npcm_pspi.c
patch
|
blob
|
history
diff --git
a/drivers/spi/npcm_pspi.c
b/drivers/spi/npcm_pspi.c
index
37bab70
..
eb14185
100644
(file)
--- 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;