nb/intel/gm45: Use PCI bitwise ops
While we are at it, also reflow a few lines that fit in 96 characters.
Tested with BUILD_TIMELESS=1, Roda RK9 does not change.
Change-Id: Icaca44280acdba099a5e13c5fd91d82c3e002bae
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42189
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Michael Niewöhner
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/northbridge/intel/gm45/northbridge.c b/src/northbridge/intel/gm45/northbridge.c
index b3dbe16..0308e21 100644
--- a/src/northbridge/intel/gm45/northbridge.c
+++ b/src/northbridge/intel/gm45/northbridge.c
@@ -259,12 +259,12 @@
break;
}
for (; fn >= 0; --fn) {
- const struct device *const d =
- pcidev_on_root(dev, fn);
- if (!d || d->enabled) continue;
- const u32 deven = pci_read_config32(d0f0, D0F0_DEVEN);
+ const struct device *const d = pcidev_on_root(dev, fn);
+ if (!d || d->enabled)
+ continue;
+ /* FIXME: Using bitwise ops changes the binary */
pci_write_config32(d0f0, D0F0_DEVEN,
- deven & ~(1 << (bit_base + fn)));
+ pci_read_config32(d0f0, D0F0_DEVEN) & ~(1 << (bit_base + fn)));
}
}