macbook21 lenovo/xx: Fix inw() in SMI handlers

Missing base may have enabled SMI for all GPI inputs.

Change-Id: I1157afaccccb17d325a4efdb1f270a27f9a299ab
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/8169
Tested-by: build bot (Jenkins)
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Kyösti Mälkki 2015-01-08 12:06:35 +02:00
parent 543888d582
commit 1d7f5c5c37
9 changed files with 9 additions and 9 deletions

View File

@ -69,7 +69,7 @@ int mainboard_smi_apmc(u8 data)
switch(data) { switch(data) {
case APM_CNT_ACPI_ENABLE: case APM_CNT_ACPI_ENABLE:
/* route H8SCI to SCI */ /* route H8SCI to SCI */
outw(inw(ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN); outw(inw(pmbase + ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN);
tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb); tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb);
tmp &= ~0x03; tmp &= ~0x03;
tmp |= 0x02; tmp |= 0x02;

View File

@ -130,7 +130,7 @@ int mainboard_smi_apmc(u8 data)
/* use 0x1600/0x1604 to prevent races with userspace */ /* use 0x1600/0x1604 to prevent races with userspace */
ec_set_ports(0x1604, 0x1600); ec_set_ports(0x1604, 0x1600);
/* route H8SCI to SCI */ /* route H8SCI to SCI */
outw(inw(ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN); outw(inw(pmbase + ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN);
tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb); tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb);
tmp &= ~0x03; tmp &= ~0x03;
tmp |= 0x02; tmp |= 0x02;

View File

@ -125,7 +125,7 @@ int mainboard_smi_apmc(u8 data)
/* use 0x1600/0x1604 to prevent races with userspace */ /* use 0x1600/0x1604 to prevent races with userspace */
ec_set_ports(0x1604, 0x1600); ec_set_ports(0x1604, 0x1600);
/* route H8SCI to SCI */ /* route H8SCI to SCI */
outw(inw(ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN); outw(inw(pmbase + ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN);
tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb); tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb);
tmp &= ~0x03; tmp &= ~0x03;
tmp |= 0x02; tmp |= 0x02;

View File

@ -130,7 +130,7 @@ int mainboard_smi_apmc(u8 data)
/* use 0x1600/0x1604 to prevent races with userspace */ /* use 0x1600/0x1604 to prevent races with userspace */
ec_set_ports(0x1604, 0x1600); ec_set_ports(0x1604, 0x1600);
/* route H8SCI to SCI */ /* route H8SCI to SCI */
outw(inw(ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN); outw(inw(pmbase + ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN);
tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb); tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb);
tmp &= ~0x03; tmp &= ~0x03;
tmp |= 0x02; tmp |= 0x02;

View File

@ -173,7 +173,7 @@ int mainboard_smi_apmc(u8 data)
/* use 0x1600/0x1604 to prevent races with userspace */ /* use 0x1600/0x1604 to prevent races with userspace */
ec_set_ports(0x1604, 0x1600); ec_set_ports(0x1604, 0x1600);
/* route H8SCI to SCI */ /* route H8SCI to SCI */
outw(inw(ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN); outw(inw(pmbase + ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN);
tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb); tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb);
tmp &= ~0x03; tmp &= ~0x03;
tmp |= 0x02; tmp |= 0x02;

View File

@ -173,7 +173,7 @@ int mainboard_smi_apmc(u8 data)
/* use 0x1600/0x1604 to prevent races with userspace */ /* use 0x1600/0x1604 to prevent races with userspace */
ec_set_ports(0x1604, 0x1600); ec_set_ports(0x1604, 0x1600);
/* route H8SCI to SCI */ /* route H8SCI to SCI */
outw(inw(ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN); outw(inw(pmbase + ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN);
tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb); tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb);
tmp &= ~0x03; tmp &= ~0x03;
tmp |= 0x02; tmp |= 0x02;

View File

@ -130,7 +130,7 @@ int mainboard_smi_apmc(u8 data)
/* use 0x1600/0x1604 to prevent races with userspace */ /* use 0x1600/0x1604 to prevent races with userspace */
ec_set_ports(0x1604, 0x1600); ec_set_ports(0x1604, 0x1600);
/* route H8SCI to SCI */ /* route H8SCI to SCI */
outw(inw(ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN); outw(inw(pmbase + ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN);
tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb); tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb);
tmp &= ~0x03; tmp &= ~0x03;
tmp |= 0x02; tmp |= 0x02;

View File

@ -130,7 +130,7 @@ int mainboard_smi_apmc(u8 data)
/* use 0x1600/0x1604 to prevent races with userspace */ /* use 0x1600/0x1604 to prevent races with userspace */
ec_set_ports(0x1604, 0x1600); ec_set_ports(0x1604, 0x1600);
/* route H8SCI to SCI */ /* route H8SCI to SCI */
outw(inw(ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN); outw(inw(pmbase + ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN);
tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb); tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb);
tmp &= ~0x03; tmp &= ~0x03;
tmp |= 0x02; tmp |= 0x02;

View File

@ -179,7 +179,7 @@ int mainboard_smi_apmc(u8 data)
/* use 0x1600/0x1604 to prevent races with userspace */ /* use 0x1600/0x1604 to prevent races with userspace */
ec_set_ports(0x1604, 0x1600); ec_set_ports(0x1604, 0x1600);
/* route H8SCI to SCI */ /* route H8SCI to SCI */
outw(inw(ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN); outw(inw(pmbase + ALT_GP_SMI_EN) & ~0x1000, pmbase + ALT_GP_SMI_EN);
tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb); tmp = pci_read_config8(PCI_DEV(0, 0x1f, 0), 0xbb);
tmp &= ~0x03; tmp &= ~0x03;
tmp |= 0x02; tmp |= 0x02;