summaryrefslogtreecommitdiff
path: root/linux_spi.c
diff options
context:
space:
mode:
authorstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2014-03-19 17:17:00 +0000
committerstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2014-03-19 17:17:00 +0000
commit0c20a90e52ac9e9955af768a601eb838e9f1f2b5 (patch)
treedd4417d9c5cc452535ab130dc47f5ac31e19c267 /linux_spi.c
parent4788122ad01454ef3af4615b99d3c872cf6a2cc4 (diff)
downloadflashrom-0c20a90e52ac9e9955af768a601eb838e9f1f2b5.tar.gz
linux_spi: Fix conversion from kHz to Hz.
A kilohertz is exactly 1000 hertz, not 1024 hertz. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1768 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'linux_spi.c')
-rw-r--r--linux_spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux_spi.c b/linux_spi.c
index d12fceb..135af9f 100644
--- a/linux_spi.c
+++ b/linux_spi.c
@@ -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);