summaryrefslogtreecommitdiff
path: root/src/mainboard/lenovo
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2019-10-25 14:05:17 +0200
committerMartin Roth <martinroth@google.com>2019-10-27 17:55:34 +0000
commit6df210b0c23b28bd3758fc8871b99752c9c825e9 (patch)
tree6b02034389ef3205306a57dd0ac59bb2bcd4b370 /src/mainboard/lenovo
parentede8dd0b9c0dcf1a2f1478e5cb4e035c148b9ed1 (diff)
mb/(ich7): Use macro instead of magic number
Change-Id: Ida291ed9f3a509e9b96a5c254433db6f8028bfb2 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36322 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/mainboard/lenovo')
-rw-r--r--src/mainboard/lenovo/t60/romstage.c8
-rw-r--r--src/mainboard/lenovo/x60/romstage.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/mainboard/lenovo/t60/romstage.c b/src/mainboard/lenovo/t60/romstage.c
index 1fe16a98c6..756ebc8eeb 100644
--- a/src/mainboard/lenovo/t60/romstage.c
+++ b/src/mainboard/lenovo/t60/romstage.c
@@ -109,12 +109,12 @@ static void early_ich7_init(void)
uint32_t reg32;
// program secondary mlt XXX byte?
- pci_write_config8(PCI_DEV(0, 0x1e, 0), 0x1b, 0x20);
+ pci_write_config8(PCI_DEV(0, 0x1e, 0), SMLT, 0x20);
// reset rtc power status
- reg8 = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xa4);
- reg8 &= ~(1 << 2);
- pci_write_config8(PCI_DEV(0, 0x1f, 0), 0xa4, reg8);
+ reg8 = pci_read_config8(PCI_DEV(0, 0x1f, 0), GEN_PMCON_3);
+ reg8 &= ~RTC_BATTERY_DEAD;
+ pci_write_config8(PCI_DEV(0, 0x1f, 0), GEN_PMCON_3, reg8);
// usb transient disconnect
reg8 = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xad);
diff --git a/src/mainboard/lenovo/x60/romstage.c b/src/mainboard/lenovo/x60/romstage.c
index 8189f8a396..34d8d7a435 100644
--- a/src/mainboard/lenovo/x60/romstage.c
+++ b/src/mainboard/lenovo/x60/romstage.c
@@ -109,12 +109,12 @@ static void early_ich7_init(void)
uint32_t reg32;
// program secondary mlt XXX byte?
- pci_write_config8(PCI_DEV(0, 0x1e, 0), 0x1b, 0x20);
+ pci_write_config8(PCI_DEV(0, 0x1e, 0), SMLT, 0x20);
// reset rtc power status
- reg8 = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xa4);
- reg8 &= ~(1 << 2);
- pci_write_config8(PCI_DEV(0, 0x1f, 0), 0xa4, reg8);
+ reg8 = pci_read_config8(PCI_DEV(0, 0x1f, 0), GEN_PMCON_3);
+ reg8 &= ~RTC_BATTERY_DEAD;
+ pci_write_config8(PCI_DEV(0, 0x1f, 0), GEN_PMCON_3, reg8);
// usb transient disconnect
reg8 = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xad);