summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/northbridge/intel/sandybridge/raminit_common.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/northbridge/intel/sandybridge/raminit_common.c b/src/northbridge/intel/sandybridge/raminit_common.c
index 96a6189118..0f42b6f461 100644
--- a/src/northbridge/intel/sandybridge/raminit_common.c
+++ b/src/northbridge/intel/sandybridge/raminit_common.c
@@ -18,11 +18,15 @@
/* FIXME: no support for 3-channel chipsets */
/* length: [1..4] */
-/* FIXME: replace with proper functions later */
-#define iosav_run_queue(ch, loops, length, as_timer) \
- MCHBAR32(IOSAV_SEQ_CTL_ch(ch)) = ((loops) | (((length) - 1) << 18) | ((as_timer) << 22))
+static void iosav_run_queue(const int ch, const u8 loops, const u8 length, const u8 as_timer)
+{
+ MCHBAR32(IOSAV_SEQ_CTL_ch(ch)) = loops | ((length - 1) << 18) | (as_timer << 22);
+}
-#define iosav_run_once(ch, length) iosav_run_queue(ch, 1, length, 0)
+static void iosav_run_once(const int ch, const u8 length)
+{
+ iosav_run_queue(ch, 1, length, 0);
+}
static void sfence(void)
{