aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>2018-04-16 23:04:29 +0530
committerStewart Smith <stewart@linux.ibm.com>2018-04-17 03:52:10 -0500
commit6dad43ff4c68b84d86fed4662f8d3c25b1c8eb0a (patch)
treeb4897b3f87d3492083dca499fefcf67e848a395b /hw
parent5362f85e04bd1b03d94711c62c20de3111234f25 (diff)
downloadskiboot-6dad43ff4c68b84d86fed4662f8d3c25b1c8eb0a.zip
skiboot-6dad43ff4c68b84d86fed4662f8d3c25b1c8eb0a.tar.gz
skiboot-6dad43ff4c68b84d86fed4662f8d3c25b1c8eb0a.tar.bz2
opal/hmi: Generate hmi event for recovered HDEC parity error.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/chiptod.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/hw/chiptod.c b/hw/chiptod.c
index 28ed897..df1274c 100644
--- a/hw/chiptod.c
+++ b/hw/chiptod.c
@@ -1491,18 +1491,21 @@ void tfmr_cleanup_core_errors(uint64_t tfmr)
}
}
-bool tfmr_clear_core_errors(uint64_t tfmr)
+int tfmr_clear_core_errors(uint64_t tfmr)
{
uint64_t tfmr_reset_errors = 0;
- if (tfmr & SPR_TFMR_HDEC_PARITY_ERROR)
- tfmr_reset_errors |= SPR_TFMR_HDEC_PARITY_ERROR;
+ /* return -1 if there is nothing to be fixed. */
+ if (!(tfmr & SPR_TFMR_HDEC_PARITY_ERROR))
+ return -1;
+
+ tfmr_reset_errors |= SPR_TFMR_HDEC_PARITY_ERROR;
/* Write TFMR twice to clear the error */
mtspr(SPR_TFMR, base_tfmr | tfmr_reset_errors);
mtspr(SPR_TFMR, base_tfmr | tfmr_reset_errors);
- return true;
+ return 1;
}
/*