hw/registerfields.h: Pull FIELD etc macros out of hw/register.h
commitafb3141c660f3dca38227901c5c62cef7af86647
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 27 Jan 2017 15:20:21 +0000 (27 15:20 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 27 Jan 2017 15:20:21 +0000 (27 15:20 +0000)
tree81fb64c7a0dbcb1becb04503906eaccc978a5dbc
parent1b9ea408fca1ce8caae67b792355b023c69c5ac5
hw/registerfields.h: Pull FIELD etc macros out of hw/register.h

hw/register.h provides macros like FIELD which make it easy to define
shift, mask and length constants for the fields within a register.
Unfortunately register.h also includes a lot of other things, some
of which will only compile in the softmmu build.

Pull the FIELD macro and friends out into a separate header file,
so they can be used in places like target/arm files which also
get built in the user-only configs.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 1484937883-1068-5-git-send-email-peter.maydell@linaro.org
include/hw/register.h
include/hw/registerfields.h [new file with mode: 0644]