diff options
author | Dan Streetman <ddstreet@ieee.org> | 2015-02-17 15:38:52 -0500 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-02-19 12:20:28 +1100 |
commit | b3749779d1c9ba4b5b1b81de3ddfa0da1b830138 (patch) | |
tree | 02673c4dc31ead4638ccd46cc1c49c70fb25ac7a /hw/xscom.c | |
parent | 7f91d66a0a3b0de9e6c729f031ee9adf9cea744b (diff) | |
download | skiboot-b3749779d1c9ba4b5b1b81de3ddfa0da1b830138.zip skiboot-b3749779d1c9ba4b5b1b81de3ddfa0da1b830138.tar.gz skiboot-b3749779d1c9ba4b5b1b81de3ddfa0da1b830138.tar.bz2 |
update users of GET/SETFIELD()
The last two patches updated GETFIELD() and SETFIELD() to no longer
require the user to specify the mask and shift of a field, and to
remove all _LSH defines and rename any _MASK defines. There are
some places where the masks were used directly, where the caller
needs to have the _MASK suffix removed. There are also two users
of SETFIELD() where the field name still has the _MASK suffix
because there is an existing macro with the base name.
Change users of SETFIELD() to include the _MASK suffix where needed.
Change direct users of any mask to remove the _MASK suffix.
Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/xscom.c')
-rw-r--r-- | hw/xscom.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -27,7 +27,7 @@ /* Mask of bits to clear in HMER before an access */ #define HMER_CLR_MASK (~(SPR_HMER_XSCOM_FAIL | \ SPR_HMER_XSCOM_DONE | \ - SPR_HMER_XSCOM_STATUS_MASK)) + SPR_HMER_XSCOM_STATUS)) #define XSCOM_ADDR_IND_FLAG PPC_BIT(0) #define XSCOM_ADDR_IND_ADDR PPC_BITMASK(12,31) @@ -259,7 +259,7 @@ static int xscom_indirect_read(uint32_t gcid, uint64_t pcb_addr, uint64_t *val) /* Write indirect address */ addr = pcb_addr & 0x7fffffff; data = XSCOM_DATA_IND_READ | - (pcb_addr & XSCOM_ADDR_IND_ADDR_MASK); + (pcb_addr & XSCOM_ADDR_IND_ADDR); rc = __xscom_write(gcid, addr, data); if (rc) goto bail; @@ -270,8 +270,8 @@ static int xscom_indirect_read(uint32_t gcid, uint64_t pcb_addr, uint64_t *val) if (rc) goto bail; if ((data & XSCOM_DATA_IND_COMPLETE) && - ((data & XSCOM_DATA_IND_ERR_MASK) == 0)) { - *val = data & XSCOM_DATA_IND_DATA_MSK; + ((data & XSCOM_DATA_IND_ERR) == 0)) { + *val = data & XSCOM_DATA_IND_DATA; break; } if ((data & XSCOM_DATA_IND_COMPLETE) || @@ -299,8 +299,8 @@ static int xscom_indirect_write(uint32_t gcid, uint64_t pcb_addr, uint64_t val) /* Write indirect address & data */ addr = pcb_addr & 0x7fffffff; - data = pcb_addr & XSCOM_ADDR_IND_ADDR_MASK; - data |= val & XSCOM_ADDR_IND_DATA_MSK; + data = pcb_addr & XSCOM_ADDR_IND_ADDR; + data |= val & XSCOM_ADDR_IND_DATA; rc = __xscom_write(gcid, addr, data); if (rc) @@ -312,7 +312,7 @@ static int xscom_indirect_write(uint32_t gcid, uint64_t pcb_addr, uint64_t val) if (rc) goto bail; if ((data & XSCOM_DATA_IND_COMPLETE) && - ((data & XSCOM_DATA_IND_ERR_MASK) == 0)) + ((data & XSCOM_DATA_IND_ERR) == 0)) break; if ((data & XSCOM_DATA_IND_COMPLETE) || (retries >= XSCOM_IND_MAX_RETRIES)) { |