mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-26 14:42:36 +02:00
linux_spi: Fix conversion from kHz to Hz
A kilohertz is exactly 1000 hertz, not 1024 hertz. Corresponding to flashrom svn r1768. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
This commit is contained in:
parent
bf8ea49c0c
commit
d29806ffde
@ -68,7 +68,7 @@ int linux_spi_init(void)
|
||||
|
||||
p = extract_programmer_param("spispeed");
|
||||
if (p && strlen(p)) {
|
||||
speed = (uint32_t)strtoul(p, &endp, 10) * 1024;
|
||||
speed = (uint32_t)strtoul(p, &endp, 10) * 1000;
|
||||
if (p == endp) {
|
||||
msg_perr("%s: invalid clock: %s kHz\n", __func__, p);
|
||||
free(p);
|
||||
|
Loading…
x
Reference in New Issue
Block a user