HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/50659 )
Change subject: nb/intel/i945/raminit: Simplify if statement blocks ......................................................................
nb/intel/i945/raminit: Simplify if statement blocks
Change-Id: Ib70b31529bce853a00b06289221ca379c835a514 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/northbridge/intel/i945/raminit.c 1 file changed, 8 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/50659/1
diff --git a/src/northbridge/intel/i945/raminit.c b/src/northbridge/intel/i945/raminit.c index 40229f46..6f81c5b 100644 --- a/src/northbridge/intel/i945/raminit.c +++ b/src/northbridge/intel/i945/raminit.c @@ -2270,15 +2270,14 @@
pci_or_config8(IGD_DEV, 0xc1, 1 << 2);
- if (integrated_graphics) { - MCHBAR16(MIPMC4) = 0x04f8; - MCHBAR16(MIPMC5) = 0x04fc; - MCHBAR16(MIPMC6) = 0x04fc; - } else { - MCHBAR16(MIPMC4) = 0x64f8; - MCHBAR16(MIPMC5) = 0x64fc; - MCHBAR16(MIPMC6) = 0x64fc; - } + if (integrated_graphics) + reg16 = 0; + else + reg16 = 0x6000; + + MCHBAR16(MIPMC4) = 0x04f8 | reg16; + MCHBAR16(MIPMC5) = 0x04fc | reg16; + MCHBAR16(MIPMC6) = 0x04fc | reg16;
reg32 = MCHBAR32(PMCFG); reg32 &= ~(3 << 17);