ALi M1543(c) ACPI and SMBUS PCI BAR's now correctly return all 0x00's when locked, as documented by the M1543 datasheet, fixes the PCI error found by Dizzy on the ASUS P5A with Debian Lenny.
This commit is contained in:
@@ -984,7 +984,7 @@ static void
|
||||
ali7101_write(int func, int addr, uint8_t val, void *priv)
|
||||
{
|
||||
ali1543_t *dev = (ali1543_t *) priv;
|
||||
ali1543_log("M7101: dev->pmu_conf[%02x] = %02x\n", addr, val);
|
||||
ali1543_log("M7101: [W] dev->pmu_conf[%02x] = %02x\n", addr, val);
|
||||
|
||||
if (func > 0)
|
||||
return;
|
||||
@@ -1408,14 +1408,24 @@ ali7101_read(int func, int addr, void *priv)
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
if (dev->pmu_dev_enable && (func == 0)) {
|
||||
if ((dev->pmu_conf[0xc9] & 0x01) && (addr >= 0x40) && (addr != 0xc9))
|
||||
return 0xff;
|
||||
|
||||
if (!(dev->pmu_conf[0xc9] & 0x01) || (addr < 0x40) || (addr == 0xc9)) {
|
||||
/* TODO: C4, C5 = GPIREG (masks: 0D, 0E) */
|
||||
switch (addr) {
|
||||
default:
|
||||
ret = dev->pmu_conf[addr];
|
||||
break;
|
||||
case 0x10 ... 0x13:
|
||||
if (dev->pmu_conf[0x5b] & 0x02)
|
||||
ret = 0x00;
|
||||
else
|
||||
ret = dev->pmu_conf[addr];
|
||||
break;
|
||||
case 0x14 ... 0x17:
|
||||
if (dev->pmu_conf[0x5b] & 0x04)
|
||||
ret = 0x00;
|
||||
else
|
||||
ret = dev->pmu_conf[addr];
|
||||
break;
|
||||
case 0x42:
|
||||
ret = (dev->pmu_conf[addr] & 0xf7) | (nvr_smi_status(dev->nvr) ? 0x08 : 0x00);
|
||||
break;
|
||||
@@ -1466,6 +1476,9 @@ ali7101_read(int func, int addr, void *priv)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ali1543_log("M7101: [R] dev->pmu_conf[%02x] = %02x\n", addr, ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user