From: Jan Kiszka <
jan.k...@siemens.com>
Hide the P2SB bridge again if it was hidden, not when it was visible.
Fixes: 670a96cdc2d5 ("watchdog: iTCO refactoring plus Apollo Lake and ICH9 support")
Signed-off-by: Jan Kiszka <
jan.k...@siemens.com>
---
drivers/watchdog/itco.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/watchdog/itco.c b/drivers/watchdog/itco.c
index 87e845f..6fe83f7 100644
--- a/drivers/watchdog/itco.c
+++ b/drivers/watchdog/itco.c
@@ -222,9 +222,9 @@ static EFI_STATUS update_no_reboot_flag_apl(__attribute__((unused))
iTCO_info *itco)
{
/* Unhide the P2SB device if it's hidden. */
- BOOLEAN p2sbvisible =
- *(volatile UINT16 *)apl_mmcfg_address(0, 13, 0, 0) != 0xFFFF;
- if (!p2sbvisible) {
+ BOOLEAN p2sb_hidden =
+ *(volatile UINT16 *)apl_mmcfg_address(0, 13, 0, 0) == 0xffff;
+ if (p2sb_hidden) {
*(volatile UINT8 *)apl_mmcfg_address(0, 13, 0, 0xE1) = 0;
}
@@ -235,7 +235,7 @@ static EFI_STATUS update_no_reboot_flag_apl(__attribute__((unused))
value &= ~itco->regs->pmc_no_reboot_mask;
*reg = value;
- if (p2sbvisible) {
+ if (p2sb_hidden) {
*(volatile UINT8 *)apl_mmcfg_address(0, 13, 0, 0xE1) = 1;
}
--
2.26.2