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:
parent
543888d582
commit
1d7f5c5c37
|
@ -69,7 +69,7 @@ int mainboard_smi_apmc(u8 data)
|
|||
switch(data) {
|
||||
case APM_CNT_ACPI_ENABLE:
|
||||
/* 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 &= ~0x03;
|
||||
tmp |= 0x02;
|
||||
|
|
|
@ -130,7 +130,7 @@ int mainboard_smi_apmc(u8 data)
|
|||
/* use 0x1600/0x1604 to prevent races with userspace */
|
||||
ec_set_ports(0x1604, 0x1600);
|
||||
/* 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 &= ~0x03;
|
||||
tmp |= 0x02;
|
||||
|
|
|
@ -125,7 +125,7 @@ int mainboard_smi_apmc(u8 data)
|
|||
/* use 0x1600/0x1604 to prevent races with userspace */
|
||||
ec_set_ports(0x1604, 0x1600);
|
||||
/* 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 &= ~0x03;
|
||||
tmp |= 0x02;
|
||||
|
|
|
@ -130,7 +130,7 @@ int mainboard_smi_apmc(u8 data)
|
|||
/* use 0x1600/0x1604 to prevent races with userspace */
|
||||
ec_set_ports(0x1604, 0x1600);
|
||||
/* 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 &= ~0x03;
|
||||
tmp |= 0x02;
|
||||
|
|
|
@ -173,7 +173,7 @@ int mainboard_smi_apmc(u8 data)
|
|||
/* use 0x1600/0x1604 to prevent races with userspace */
|
||||
ec_set_ports(0x1604, 0x1600);
|
||||
/* 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 &= ~0x03;
|
||||
tmp |= 0x02;
|
||||
|
|
|
@ -173,7 +173,7 @@ int mainboard_smi_apmc(u8 data)
|
|||
/* use 0x1600/0x1604 to prevent races with userspace */
|
||||
ec_set_ports(0x1604, 0x1600);
|
||||
/* 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 &= ~0x03;
|
||||
tmp |= 0x02;
|
||||
|
|
|
@ -130,7 +130,7 @@ int mainboard_smi_apmc(u8 data)
|
|||
/* use 0x1600/0x1604 to prevent races with userspace */
|
||||
ec_set_ports(0x1604, 0x1600);
|
||||
/* 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 &= ~0x03;
|
||||
tmp |= 0x02;
|
||||
|
|
|
@ -130,7 +130,7 @@ int mainboard_smi_apmc(u8 data)
|
|||
/* use 0x1600/0x1604 to prevent races with userspace */
|
||||
ec_set_ports(0x1604, 0x1600);
|
||||
/* 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 &= ~0x03;
|
||||
tmp |= 0x02;
|
||||
|
|
|
@ -179,7 +179,7 @@ int mainboard_smi_apmc(u8 data)
|
|||
/* use 0x1600/0x1604 to prevent races with userspace */
|
||||
ec_set_ports(0x1604, 0x1600);
|
||||
/* 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 &= ~0x03;
|
||||
tmp |= 0x02;
|
||||
|
|
Loading…
Reference in New Issue