aboutsummaryrefslogtreecommitdiff
path: root/include/processor.h
diff options
context:
space:
mode:
authorDan Streetman <ddstreet@ieee.org>2015-02-17 15:38:51 -0500
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-02-19 12:20:28 +1100
commit7f91d66a0a3b0de9e6c729f031ee9adf9cea744b (patch)
treea437651457118988abfd0def903dad75df94c149 /include/processor.h
parent4a88a1452fe0e7f7d17d20aaf9b451969fb8c465 (diff)
downloadskiboot-7f91d66a0a3b0de9e6c729f031ee9adf9cea744b.zip
skiboot-7f91d66a0a3b0de9e6c729f031ee9adf9cea744b.tar.gz
skiboot-7f91d66a0a3b0de9e6c729f031ee9adf9cea744b.tar.bz2
Change user-defined _MASK/_LSH to just mask
The last patch changed the SETFIELD() and GETFIELD() macros to automatically calculate the shift of a given mask, so manually specifying the shift is no longer needed. Additionally, any masks should have the _MASK suffix removed since the GETFIELD() and SETFIELD() operations expected to be passed the mask name without the _MASK suffix (and so either the mask name or the get/setfield call needs to have its mask name changed). Change all _MASK masks to remove the _MASK suffix, except for any places that leaving _MASK makes sense (e.g. already an existing define without _MASK suffix). Remove all _LSH defines, as they are no longer needed. Signed-off-by: Dan Streetman <ddstreet@ieee.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/processor.h')
-rw-r--r--include/processor.h30
1 files changed, 10 insertions, 20 deletions
diff --git a/include/processor.h b/include/processor.h
index c15e17e..31ed72d 100644
--- a/include/processor.h
+++ b/include/processor.h
@@ -95,13 +95,10 @@
/* Bits in TFMR - control bits */
-#define SPR_TFMR_MAX_CYC_BET_STEPS_MASK PPC_BITMASK(0,7)
-#define SPR_TFMR_MAX_CYC_BET_STEPS_LSH PPC_BITLSHIFT(7)
-#define SPR_TFMR_N_CLKS_PER_STEP_MASK PPC_BITMASK(8,9)
-#define SPR_TFMR_N_CLKS_PER_STEP_LSH PPC_BITLSHIFT(9)
+#define SPR_TFMR_MAX_CYC_BET_STEPS PPC_BITMASK(0,7)
+#define SPR_TFMR_N_CLKS_PER_STEP PPC_BITMASK(8,9)
#define SPR_TFMR_MASK_HMI PPC_BIT(10)
-#define SPR_TFMR_SYNC_BIT_SEL_MASK PPC_BITMASK(11,13)
-#define SPR_TFMR_SYNC_BIT_SEL_LSH PPC_BITLSHIFT(13)
+#define SPR_TFMR_SYNC_BIT_SEL PPC_BITMASK(11,13)
#define SPR_TFMR_TB_ECLIPZ PPC_BIT(14)
#define SPR_TFMR_LOAD_TOD_MOD PPC_BIT(16)
#define SPR_TFMR_MOVE_CHIP_TOD_TO_TB PPC_BIT(18)
@@ -109,10 +106,8 @@
/* Bits in TFMR - thread indep. status bits */
#define SPR_TFMR_HDEC_PARITY_ERROR PPC_BIT(26)
#define SPR_TFMR_TBST_CORRUPT PPC_BIT(27)
-#define SPR_TFMR_TBST_ENCODED_MASK PPC_BITMASK(28,31)
-#define SPR_TFMR_TBST_ENCODED_LSH PPC_BITLSHIFT(31)
-#define SPR_TFMR_TBST_LAST_MASK PPC_BITMASK(32,35)
-#define SPR_TFMR_TBST_LAST_LSH PPC_BITLSHIFT(35)
+#define SPR_TFMR_TBST_ENCODED PPC_BITMASK(28,31)
+#define SPR_TFMR_TBST_LAST PPC_BITMASK(32,35)
#define SPR_TFMR_TB_ENABLED PPC_BIT(40)
#define SPR_TFMR_TB_VALID PPC_BIT(41)
#define SPR_TFMR_TB_SYNC_OCCURED PPC_BIT(42)
@@ -120,8 +115,7 @@
#define SPR_TFMR_TB_MISSING_STEP PPC_BIT(44)
#define SPR_TFMR_TB_RESIDUE_ERR PPC_BIT(45)
#define SPR_TFMR_FW_CONTROL_ERR PPC_BIT(46)
-#define SPR_TFMR_CHIP_TOD_STATUS_MASK PPC_BITMASK(47,50)
-#define SPR_TFMR_CHIP_TOD_STATUS_LSH PPC_BITLSHIFT(50)
+#define SPR_TFMR_CHIP_TOD_STATUS PPC_BITMASK(47,50)
#define SPR_TFMR_CHIP_TOD_INTERRUPT PPC_BIT(51)
#define SPR_TFMR_CHIP_TOD_TIMEOUT PPC_BIT(54)
#define SPR_TFMR_CHIP_TOD_PARITY_ERR PPC_BIT(56)
@@ -147,8 +141,7 @@
#define SPR_HMER_SCOM_FIR_HMI PPC_BIT(16)
#define SPR_HMER_TRIG_FIR_HMI PPC_BIT(17)
#define SPR_HMER_HYP_RESOURCE_ERR PPC_BIT(20)
-#define SPR_HMER_XSCOM_STATUS_MASK PPC_BITMASK(21,23)
-#define SPR_HMER_XSCOM_STATUS_LSH PPC_BITLSHIFT(23)
+#define SPR_HMER_XSCOM_STATUS PPC_BITMASK(21,23)
/*
* HMEER: initial bits for HMI interrupt enable mask.
@@ -167,12 +160,9 @@
#define SPR_HID0_ENABLE_ATTN PPC_BIT(31)
/* PVR bits */
-#define SPR_PVR_TYPE_MASK 0xffff0000
-#define SPR_PVR_TYPE_LSH 16
-#define SPR_PVR_VERS_MAJ_MASK 0x00000f00
-#define SPR_PVR_VERS_MAJ_LSH 8
-#define SPR_PVR_VERS_MIN_MASK 0x000000ff
-#define SPR_PVR_VERS_MIN_LSH 0
+#define SPR_PVR_TYPE 0xffff0000
+#define SPR_PVR_VERS_MAJ 0x00000f00
+#define SPR_PVR_VERS_MIN 0x000000ff
#define PVR_TYPE(_pvr) GETFIELD(SPR_PVR_TYPE, _pvr)
#define PVR_VERS_MAJ(_pvr) GETFIELD(SPR_PVR_VERS_MAJ, _pvr)