summaryrefslogtreecommitdiff
path: root/src/soc/amd/stoneyridge
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2020-01-28 11:00:09 -0700
committerAaron Durbin <adurbin@chromium.org>2020-01-31 17:11:26 +0000
commit1278728fbcee7849bf646e396611426679030c60 (patch)
tree7e89600702703fe0665d15866907b2fd13930324 /src/soc/amd/stoneyridge
parent5c0ef702445520e6df74f4c940163dfb8035b64b (diff)
soc/amd/stoneyridge: use SMBus timeout in compilation unit
The timeout is fixed and only used in one place. Put the assumption in the compliation unit utilizing the defintion. Change-Id: I7537549da90d0bc158e638c533e8e8b0f1e28a7d Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38612 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/stoneyridge')
-rw-r--r--src/soc/amd/stoneyridge/include/soc/smbus.h6
-rw-r--r--src/soc/amd/stoneyridge/smbus.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/soc/amd/stoneyridge/include/soc/smbus.h b/src/soc/amd/stoneyridge/include/soc/smbus.h
index 4638fcdd83..ada7cfb9a4 100644
--- a/src/soc/amd/stoneyridge/include/soc/smbus.h
+++ b/src/soc/amd/stoneyridge/include/soc/smbus.h
@@ -19,12 +19,6 @@
#include <stdint.h>
#include <soc/iomap.h>
-/*
- * Between 1-10 seconds, We should never timeout normally
- * Longer than this is just painful when a timeout condition occurs.
- */
-#define SMBUS_TIMEOUT (100 * 1000 * 10)
-
int do_smbus_read_byte(u32 mmio, u8 device, u8 address);
int do_smbus_write_byte(u32 mmio, u8 device, u8 address, u8 val);
int do_smbus_recv_byte(u32 mmio, u8 device);
diff --git a/src/soc/amd/stoneyridge/smbus.c b/src/soc/amd/stoneyridge/smbus.c
index 79f09d6b88..f5a9d604ea 100644
--- a/src/soc/amd/stoneyridge/smbus.c
+++ b/src/soc/amd/stoneyridge/smbus.c
@@ -19,6 +19,12 @@
#include <soc/smbus.h>
#include <soc/southbridge.h>
+/*
+ * Between 1-10 seconds, We should never timeout normally
+ * Longer than this is just painful when a timeout condition occurs.
+ */
+#define SMBUS_TIMEOUT (100 * 1000 * 10)
+
static u8 controller_read8(u32 base, u8 reg)
{
switch (base) {