aboutsummaryrefslogtreecommitdiff
path: root/hw/lpc.c
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 /hw/lpc.c
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 'hw/lpc.c')
-rw-r--r--hw/lpc.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/hw/lpc.c b/hw/lpc.c
index b6d9a63..0db674f 100644
--- a/hw/lpc.c
+++ b/hw/lpc.c
@@ -37,29 +37,22 @@ DEFINE_LOG_ENTRY(OPAL_RC_LPC_WRITE, OPAL_PLATFORM_ERR_EVT, OPAL_LPC,
#define ECCB_DATA 3 /* b0023 -> b00218 */
#define ECCB_CTL_MAGIC 0xd000000000000000ul
-#define ECCB_CTL_DATASZ_MASK PPC_BITMASK(4,7)
-#define ECCB_CTL_DATASZ_LSH PPC_BITLSHIFT(7)
+#define ECCB_CTL_DATASZ PPC_BITMASK(4,7)
#define ECCB_CTL_READ PPC_BIT(15)
-#define ECCB_CTL_ADDRLEN_MASK PPC_BITMASK(23,25)
-#define ECCB_CTL_ADDRLEN_LSH PPC_BITLSHIFT(25)
+#define ECCB_CTL_ADDRLEN PPC_BITMASK(23,25)
#define ECCB_ADDRLEN_4B 0x4
-#define ECCB_CTL_ADDR_MASK PPC_BITMASK(32,63)
-#define ECCB_CTL_ADDR_LSH 0
+#define ECCB_CTL_ADDR PPC_BITMASK(32,63)
-#define ECCB_STAT_PIB_ERR_MASK PPC_BITMASK(0,5)
-#define ECCB_STAT_PIB_ERR_LSH PPC_BITLSHIFT(5)
-#define ECCB_STAT_RD_DATA_MASK PPC_BITMASK(6,37)
-#define ECCB_STAT_RD_DATA_LSH PPC_BITLSHIFT(37)
+#define ECCB_STAT_PIB_ERR PPC_BITMASK(0,5)
+#define ECCB_STAT_RD_DATA PPC_BITMASK(6,37)
#define ECCB_STAT_BUSY PPC_BIT(44)
-#define ECCB_STAT_ERRORS1_MASK PPC_BITMASK(45,51)
-#define ECCB_STAT_ERRORS1_LSH PPC_BITLSHIFT(51)
+#define ECCB_STAT_ERRORS1 PPC_BITMASK(45,51)
#define ECCB_STAT_OP_DONE PPC_BIT(52)
-#define ECCB_STAT_ERRORS2_MASK PPC_BITMASK(53,55)
-#define ECCB_STAT_ERRORS3_LSH PPC_BITLSHIFT(55)
+#define ECCB_STAT_ERRORS2 PPC_BITMASK(53,55)
-#define ECCB_STAT_ERR_MASK (ECCB_STAT_PIB_ERR_MASK | \
- ECCB_STAT_ERRORS1_MASK | \
- ECCB_STAT_ERRORS2_MASK)
+#define ECCB_STAT_ERR_MASK (ECCB_STAT_PIB_ERR | \
+ ECCB_STAT_ERRORS1 | \
+ ECCB_STAT_ERRORS2)
#define ECCB_TIMEOUT 1000000