Attention is currently required from: Nico Huber, Arthur Heymans, Patrick Rudolph. Hello Nico Huber, Arthur Heymans, Patrick Rudolph,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/55045
to review the following change.
Change subject: nb/intel/sandybridge: Drop `DMIBAR32_UPDATE` macro ......................................................................
nb/intel/sandybridge: Drop `DMIBAR32_UPDATE` macro
Now that the temporary `DMIBAR32_UPDATE` macro has served its purpose, replace it with calls to the `dmibar_clrsetbits32` function. If either the `unset` or `set` argument value is irrelevant, drop it and use the `dmibar_clrbits32` or `dmibar_setbits32` macro instead.
Tested with BUILD_TIMELESS=1, Asus P8Z77-V LX2 remains identical.
Change-Id: I505a77f3675f9300641b1ff5a7351051847b20af Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/northbridge/intel/sandybridge/early_dmi.c 1 file changed, 30 insertions(+), 32 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/55045/1
diff --git a/src/northbridge/intel/sandybridge/early_dmi.c b/src/northbridge/intel/sandybridge/early_dmi.c index 30e8109..3417af6 100644 --- a/src/northbridge/intel/sandybridge/early_dmi.c +++ b/src/northbridge/intel/sandybridge/early_dmi.c @@ -6,8 +6,6 @@ #include <northbridge/intel/sandybridge/sandybridge.h> #include <southbridge/intel/bd82x6x/pch.h>
-#define DMIBAR32_UPDATE(x, val, clear, set) dmibar_clrsetbits32(x, clear, set) - static void dmi_recipe(void) { const u32 cpuid = cpu_get_cpuid(); @@ -38,106 +36,106 @@ }
for (i = 0; i < 2; i++) { - DMIBAR32_UPDATE(0x0904 + (i << 5), 0x7a1842ec, 0x3f << 16, 0x18 << 16); - DMIBAR32_UPDATE(0x090c + (i << 5), 0x00000208, 0x3f << 5, 0x09 << 5); + dmibar_clrsetbits32(0x0904 + (i << 5), 0x3f << 16, 0x18 << 16); + dmibar_clrsetbits32(0x090c + (i << 5), 0x3f << 5, 0x09 << 5); }
for (i = 0; i < 2; i++) { - DMIBAR32_UPDATE(0x0700 + (i << 5), 0x46139008, 0, 1 << 15); + dmibar_setbits32(0x0700 + (i << 5), 1 << 15); }
- DMIBAR32_UPDATE(0x0c04, 0x2e680008, 0xff << 21, 0x73 << 21); + dmibar_clrsetbits32(0x0c04, 0xff << 21, 0x73 << 21);
for (i = 0; i < 2; i++) { - DMIBAR32_UPDATE(0x0904 + (i << 5), 0x7a1842ec, 3 << 29, 1 << 29); + dmibar_clrsetbits32(0x0904 + (i << 5), 3 << 29, 1 << 29); }
for (i = 0; i < 2; i++) { - DMIBAR32_UPDATE(0x0910 + (i << 5), 0x00006300, 0xf << 10, 0 << 10); + dmibar_clrbits32(0x0910 + (i << 5), 0xf << 10); }
for (i = 0; i < 4; i++) { - DMIBAR32_UPDATE(0x0a00 + (i << 4), 0x03042010, 0x1f << 1, 12 << 1); + dmibar_clrsetbits32(0x0a00 + (i << 4), 0x1f << 1, 12 << 1); }
- DMIBAR32_UPDATE(0x0c00, 0x29700c08, 1 << 4, 0 << 4); + dmibar_clrbits32(0x0c00, 1 << 4);
for (i = 0; i < 4; i++) { - DMIBAR32_UPDATE(0x0a04 + (i << 4), 0x0c0708f0, 1 << 12, 1 << 12); + dmibar_setbits32(0x0a04 + (i << 4), 1 << 12); }
for (i = 0; i < 2; i++) { - DMIBAR32_UPDATE(0x0900 + (i << 5), 0x50000000, 3 << 26, 0 << 26); + dmibar_clrbits32(0x0900 + (i << 5), 3 << 26); }
for (i = 0; i < 2; i++) { - DMIBAR32_UPDATE(0x0908 + (i << 5), 0x51ffffff, 3 << 27, 2 << 27); + dmibar_clrsetbits32(0x0908 + (i << 5), 3 << 27, 2 << 27); }
for (i = 0; i < 4; i++) { - DMIBAR32_UPDATE(0x0a00 + (i << 4), 0x03042018, 3 << 17, 2 << 17); + dmibar_clrsetbits32(0x0a00 + (i << 4), 3 << 17, 2 << 17); }
for (i = 0; i < 2; i++) { - DMIBAR32_UPDATE(0x0700 + (i << 5), 0x46139008, 1 << 3, 1 << 3); + dmibar_setbits32(0x0700 + (i << 5), 1 << 3); }
for (i = 0; i < 2; i++) { - DMIBAR32_UPDATE(0x0904 + (i << 5), 0x3a1842ec, 3 << 10, 1 << 10); + dmibar_clrsetbits32(0x0904 + (i << 5), 3 << 10, 1 << 10); }
for (i = 0; i < 4; i++) { - DMIBAR32_UPDATE(0x0a00 + (i << 4), 0x03042018, 3 << 24, 3 << 24); + dmibar_setbits32(0x0a00 + (i << 4), 3 << 24); }
for (i = 0; i < 2; i++) { - DMIBAR32_UPDATE(0x0908 + (i << 5), 0x51ffffff, 3 << 30, 1 << 30); + dmibar_clrsetbits32(0x0908 + (i << 5), 3 << 30, 1 << 30); }
- DMIBAR32_UPDATE(0x0c00, 0x29700c08, 0x1f << 25, 0x14 << 25); + dmibar_clrsetbits32(0x0c00, 0x1f << 25, 0x14 << 25);
- DMIBAR32_UPDATE(0x0c0c, 0x16063400, 0x3f << 23, 0x00 << 23); + dmibar_clrbits32(0x0c0c, 0x3f << 23);
for (i = 0; i < 2; i++) { - DMIBAR32_UPDATE(0x0700 + (i << 5), 0x46139008, 1 << 21, 1 << 21); + dmibar_setbits32(0x0700 + (i << 5), 1 << 21); }
for (i = 0; i < 2; i++) { - DMIBAR32_UPDATE(0x0700 + (i << 5), 0x46339008, 3 << 24, 1 << 24); + dmibar_clrsetbits32(0x0700 + (i << 5), 3 << 24, 1 << 24); }
for (i = 0; i < 2; i++) { - DMIBAR32_UPDATE(0x0700 + (i << 5), 0x45339008, 1 << 19, 1 << 19); + dmibar_setbits32(0x0700 + (i << 5), 1 << 19); }
for (i = 0; i < 2; i++) { - DMIBAR32_UPDATE(0x0700 + (i << 5), 0x453b9008, 1 << 23, 1 << 23); + dmibar_setbits32(0x0700 + (i << 5), 1 << 23); }
for (i = 0; i < 2; i++) { - DMIBAR32_UPDATE(0x0700 + (i << 5), 0x45bb9008, 1 << 22, 1 << 22); + dmibar_setbits32(0x0700 + (i << 5), 1 << 22); }
for (i = 0; i < 2; i++) { - DMIBAR32_UPDATE(0x0914 + (i << 5), 0x9021a080, 1 << 9, 1 << 9); + dmibar_setbits32(0x0914 + (i << 5), 1 << 9); }
for (i = 0; i < 2; i++) { - DMIBAR32_UPDATE(0x0914 + (i << 5), 0x9021a280, 1 << 27, 1 << 27); + dmibar_setbits32(0x0914 + (i << 5), 1 << 27); }
for (i = 0; i < 4; i++) { - DMIBAR32_UPDATE(0x0a00 + (i << 4), 0x03042018, 1 << 21, 1 << 21); + dmibar_setbits32(0x0a00 + (i << 4), 1 << 21); }
- DMIBAR32_UPDATE(0x0258, 0x40000600, 1 << 29, 1 << 29); + dmibar_setbits32(0x0258, 1 << 29);
for (i = 0; i < 2; i++) { - DMIBAR32_UPDATE(0x0904 + (i << 5), 0x3a1846ec, 0xf << 25, 0x5 << 25); - DMIBAR32_UPDATE(0x0914 + (i << 5), 0x9821a280, 0xf << 13, 0x0 << 13); + dmibar_clrsetbits32(0x0904 + (i << 5), 0xf << 25, 0x5 << 25); + dmibar_clrbits32(0x0914 + (i << 5), 0xf << 13); }
- DMIBAR32_UPDATE(DMIL0SLAT, 0x00c26460, 0xffff << 0, 0x403c << 0); + dmibar_clrsetbits32(DMIL0SLAT, 0xffff << 0, 0x403c << 0); }
void early_init_dmi(void)