aboutsummaryrefslogtreecommitdiff
path: root/include/phb3-regs.h
diff options
context:
space:
mode:
authorDan Streetman <ddstreet@ieee.org>2015-02-17 15:38:50 -0500
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-02-19 12:20:28 +1100
commit4a88a1452fe0e7f7d17d20aaf9b451969fb8c465 (patch)
tree9df519b176b2172bd36e963764534bb7a2edc30a /include/phb3-regs.h
parent348d5c4875ec46792d1749a88ec7457c62650e08 (diff)
downloadskiboot-4a88a1452fe0e7f7d17d20aaf9b451969fb8c465.zip
skiboot-4a88a1452fe0e7f7d17d20aaf9b451969fb8c465.tar.gz
skiboot-4a88a1452fe0e7f7d17d20aaf9b451969fb8c465.tar.bz2
simplify GET/SETFIELD() use, add MASK_TO_LSH()
Currently, the GETFIELD() and SETFIELD() macros require the user to define both the _MASK and the _LSH of the field. However, the shift of the field is trivially determinable and there is no reason it needs to be specified by the user. Add MASK_TO_LSH() macro, which determines the shift of a given mask. Change GETFIELD() and SETFIELD() to use MASK_TO_LSH() to determine the shift of the specified mask, instead of requiring it to be specified by the user. Signed-off-by: Dan Streetman <ddstreet@ieee.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/phb3-regs.h')
0 files changed, 0 insertions, 0 deletions