Fixed Power Management register handling on the PC87309 Super I/O chip.
This commit is contained in:
@@ -56,10 +56,9 @@ pc87309_pm_write(uint16_t port, uint8_t val, void *priv)
|
|||||||
{
|
{
|
||||||
pc87309_t *dev = (pc87309_t *) priv;
|
pc87309_t *dev = (pc87309_t *) priv;
|
||||||
|
|
||||||
if (port & 1)
|
if (port & 1) {
|
||||||
dev->pm[dev->pm_idx] = val;
|
dev->pm[dev->pm_idx] = val;
|
||||||
else {
|
|
||||||
dev->pm_idx = val & 0x07;
|
|
||||||
switch (dev->pm_idx) {
|
switch (dev->pm_idx) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
fdc_handler(dev);
|
fdc_handler(dev);
|
||||||
@@ -68,7 +67,8 @@ pc87309_pm_write(uint16_t port, uint8_t val, void *priv)
|
|||||||
serial_handler(dev, 0);
|
serial_handler(dev, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
|
dev->pm_idx = val & 0x07;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user