From df5cc9b03876ac34f296a8ad900e116182fee47f Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 10 Mar 2025 21:31:29 +0100 Subject: [PATCH] VIA PIPC: Restore old readout on the VT82C596/B southbridges, where it was correct, fixes the P6BAT. --- src/chipset/via_pipc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/chipset/via_pipc.c b/src/chipset/via_pipc.c index 11a192450..f7f5bf208 100644 --- a/src/chipset/via_pipc.c +++ b/src/chipset/via_pipc.c @@ -61,6 +61,7 @@ #define VIA_PIPC_586B 0x05864700 #define VIA_PIPC_596A 0x05960900 #define VIA_PIPC_596B 0x05962300 +#define VIA_PIPC_596 0x0596 #define VIA_PIPC_686A 0x06861400 #define VIA_PIPC_686B 0x06864000 #define VIA_PIPC_8231 0x82311000 @@ -413,7 +414,7 @@ pipc_reset_hard(void *priv) dev->power_regs[0x34] = 0x68; dev->power_regs[0x40] = 0x20; - dev->power_regs[0x42] = 0x00; + dev->power_regs[0x42] = ((dev->local >> 16) == VIA_PIPC_596) ? 0x50 : 0x00; acpi_set_irq_line(dev->acpi, 0x00); dev->power_regs[0x48] = 0x01; @@ -1595,7 +1596,7 @@ pipc_reset(void *priv) pipc_write(pm_func, 0x48, 0x01, priv); pipc_write(pm_func, 0x49, 0x00, priv); - dev->power_regs[0x42] = 0x00; + dev->power_regs[0x42] = ((dev->local >> 16) == VIA_PIPC_596) ? 0x50 : 0x00; acpi_set_irq_line(dev->acpi, 0x00); pipc_write(1, 0x04, 0x80, priv);