• A
    register: Add Register API · 1599121b
    Alistair Francis 提交于
    This API provides some encapsulation of registers and factors out some
    common functionality to common code. Bits of device state (usually MMIO
    registers) often have all sorts of access restrictions and semantics
    associated with them. This API allows you to define what those
    restrictions are on a bit-by-bit basis.
    
    Helper functions are then used to access the register which observe the
    semantics defined by the RegisterAccessInfo struct.
    
    Some features:
    Bits can be marked as read_only (ro field)
    Bits can be marked as write-1-clear (w1c field)
    Bits can be marked as reserved (rsvd field)
    Reset values can be defined (reset)
    Bits can be marked clear on read (cor)
    Pre and post action callbacks can be added to read and write ops
    Verbose debugging info can be enabled/disabled
    
    Useful for defining device register spaces in a data driven way. Cuts
    down on a lot of the verbosity and repetition in the switch-case blocks
    in the standard foo_mmio_read/write functions.
    
    Also useful for automated generation of device models from hardware
    design sources.
    Signed-off-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
    Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
    Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
    Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
    Message-id: 40d62c7e1bf6e63bb4193ec46b15092a7d981e59.1467053537.git.alistair.francis@xilinx.com
    Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
    1599121b
Makefile.objs 708 字节