summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/reg_booke.h
diff options
context:
space:
mode:
authorBharat Bhushan <r65777@freescale.com>2012-08-08 20:38:19 +0000
committerAlexander Graf <agraf@suse.de>2012-10-05 23:38:47 +0200
commitf61c94bb99ca4253ac5dd57750e1af209a4beb7a (patch)
tree348d15c584a683cd805ed71ed5c8a81848d24e70 /arch/powerpc/include/asm/reg_booke.h
parent7c973a2ebb8fb9c8ee2ae9647f9ad7b0ad58a3e6 (diff)
downloadtalos-obmc-linux-f61c94bb99ca4253ac5dd57750e1af209a4beb7a.tar.gz
talos-obmc-linux-f61c94bb99ca4253ac5dd57750e1af209a4beb7a.zip
KVM: PPC: booke: Add watchdog emulation
This patch adds the watchdog emulation in KVM. The watchdog emulation is enabled by KVM_ENABLE_CAP(KVM_CAP_PPC_BOOKE_WATCHDOG) ioctl. The kernel timer are used for watchdog emulation and emulates h/w watchdog state machine. On watchdog timer expiry, it exit to QEMU if TCR.WRC is non ZERO. QEMU can reset/shutdown etc depending upon how it is configured. Signed-off-by: Liu Yu <yu.liu@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com> [bharat.bhushan@freescale.com: reworked patch] Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com> [agraf: adjust to new request framework] Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/include/asm/reg_booke.h')
-rw-r--r--arch/powerpc/include/asm/reg_booke.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h
index 2d916c4982c5..e07e6af5e1ff 100644
--- a/arch/powerpc/include/asm/reg_booke.h
+++ b/arch/powerpc/include/asm/reg_booke.h
@@ -539,6 +539,13 @@
#define TCR_FIE 0x00800000 /* FIT Interrupt Enable */
#define TCR_ARE 0x00400000 /* Auto Reload Enable */
+#ifdef CONFIG_E500
+#define TCR_GET_WP(tcr) ((((tcr) & 0xC0000000) >> 30) | \
+ (((tcr) & 0x1E0000) >> 15))
+#else
+#define TCR_GET_WP(tcr) (((tcr) & 0xC0000000) >> 30)
+#endif
+
/* Bit definitions for the TSR. */
#define TSR_ENW 0x80000000 /* Enable Next Watchdog */
#define TSR_WIS 0x40000000 /* WDT Interrupt Status */
OpenPOWER on IntegriCloud