nb/intel/sandybridge: Replace macros with functions

Turn `iosav_run_queue` and `iosav_run_once` into functions. Inlining
them does not have any effect, as the resulting binary is identical.

Tested on Asus P8Z77-V LX2, still boots.

Change-Id: I7844814eeedad9b1d24f833a77c90902fa926bfe
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40983
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
Angel Pons 2020-05-02 23:14:27 +02:00
parent ad70400519
commit e7afcd5391
1 changed files with 8 additions and 4 deletions

View File

@ -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)
{