mb/lenovo/*/romstage: Use macros instead of magic numbers

Apparently coreboot still uses magic numbers instead of macros in some
Lenovo mainboards. Let's use macros instead.

Note that IOTR[0123] is a 64-bit width variable.

Change-Id: Icf185c77ede5a258fe37be9e772be6804d014b57
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/c/29208
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
Peter Lemenkov
2018-10-23 11:17:32 +02:00
committed by Patrick Georgi
parent 7b42811fa5
commit e23245517b
3 changed files with 14 additions and 14 deletions

View File

@ -74,8 +74,8 @@ static void early_superio_config(void)
static void rcba_config(void)
{
/* Set up virtual channel 0 */
RCBA32(0x0014) = 0x80000001;
RCBA32(0x001c) = 0x03128010;
RCBA32(V0CTL) = 0x80000001;
RCBA32(V1CAP) = 0x03128010;
/* Device 1f interrupt pin register */
RCBA32(D31IP) = 0x00001230;
@ -100,12 +100,12 @@ static void rcba_config(void)
RCBA32(FD) |= FD_INTLAN;
/* Set up I/O Trap #0 for 0xfe00 (SMIC) */
RCBA32(0x1e84) = 0x00020001;
RCBA32(0x1e80) = 0x0000fe01;
RCBA32(IOTR0) = 0x0000fe01;
RCBA32(IOTR0+4) = 0x00020001;
/* Set up I/O Trap #3 for 0x800-0x80c (Trap) */
RCBA32(0x1e9c) = 0x000200f0;
RCBA32(0x1e98) = 0x000c0801;
RCBA32(IOTR3) = 0x000c0801;
RCBA32(IOTR3+4) = 0x000200f0;
}
static void early_ich7_init(void)

View File

@ -73,8 +73,8 @@ static void early_superio_config(void)
static void rcba_config(void)
{
/* Set up virtual channel 0 */
RCBA32(0x0014) = 0x80000001;
RCBA32(0x001c) = 0x03128010;
RCBA32(V0CTL) = 0x80000001;
RCBA32(V1CAP) = 0x03128010;
/* Device 1f interrupt pin register */
RCBA32(D31IP) = 0x00001230;
@ -99,12 +99,12 @@ static void rcba_config(void)
RCBA32(FD) |= FD_INTLAN;
/* Set up I/O Trap #0 for 0xfe00 (SMIC) */
RCBA32(0x1e84) = 0x00020001;
RCBA32(0x1e80) = 0x0000fe01;
RCBA32(IOTR0) = 0x0000fe01;
RCBA32(IOTR0+4) = 0x00020001;
/* Set up I/O Trap #3 for 0x800-0x80c (Trap) */
RCBA32(0x1e9c) = 0x000200f0;
RCBA32(0x1e98) = 0x000c0801;
RCBA32(IOTR3) = 0x000c0801;
RCBA32(IOTR3+4) = 0x000200f0;
}
static void early_ich7_init(void)

View File

@ -100,12 +100,12 @@ static void rcba_config(void)
RCBA32(FD) |= FD_INTLAN;
/* Set up I/O Trap #0 for 0xfe00 (SMIC) */
RCBA32(0x1e84) = 0x00020001;
RCBA32(IOTR0) = 0x0000fe01;
RCBA32(IOTR0+4) = 0x00020001;
/* Set up I/O Trap #3 for 0x800-0x80c (Trap) */
RCBA32(0x1e9c) = 0x000200f0;
RCBA32(IOTR3) = 0x000c0801;
RCBA32(IOTR3+4) = 0x000200f0;
}
static void early_ich7_init(void)