summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/head_fsl_booke.S
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2013-03-02 08:50:33 (GMT)
committerFleming Andrew-AFLEMING <AFLEMING@freescale.com>2013-04-12 20:55:58 (GMT)
commit4099f70e94789731c3a20f89be058cfb2bfed836 (patch)
tree25502a586adb334e22eb975a39109fd0282ce7e7 /arch/powerpc/kernel/head_fsl_booke.S
parente2da5b69368bcae4fd1e121725a9b438c761f51c (diff)
downloadlinux-fsl-qoriq-4099f70e94789731c3a20f89be058cfb2bfed836.tar.xz
powerpc/e500: work around erratum A-006184
Erratum A-006184 says that a hang can happen under certain circumstances when taking an exception. The erratum workaround gives the use of a watchdog as an option, to get unstuck if a hang does occur. Signed-off-by: Scott Wood <scottwood@freescale.com> Change-Id: Ib63bea70bb2ad7ea4cee9b96ec4f7aefc21ea3b3 Reviewed-on: http://git.am.freescale.net:8181/1113 Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'arch/powerpc/kernel/head_fsl_booke.S')
-rw-r--r--arch/powerpc/kernel/head_fsl_booke.S10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index 58925b6..987a3f1 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -369,7 +369,15 @@ interrupt_base:
unknown_exception, EXC_XFER_EE)
/* Watchdog Timer Interrupt */
-#ifdef CONFIG_BOOKE_WDT
+#ifdef CONFIG_FSL_ERRATUM_A_006184
+ START_EXCEPTION(WatchdogTimer)
+ mtspr SPRN_SPRG_WSCRATCH_CRIT, r3
+ lis r3, TSR_WIS@h
+ mtspr SPRN_TSR, r3
+ /* use WSCRATCH to avoid any potential problems with KVM paravirt */
+ mfspr r3, SPRN_SPRG_WSCRATCH_CRIT
+ rfci
+#elif defined(CONFIG_BOOKE_WDT)
CRITICAL_EXCEPTION(0x3200, WATCHDOG, WatchdogTimer, WatchdogException)
#else
CRITICAL_EXCEPTION(0x3200, WATCHDOG, WatchdogTimer, unknown_exception)