• Krystian Garbaciak's avatar
    regmap: Add support for register indirect addressing. · 6863ca62
    Krystian Garbaciak authored
    Devices with register paging or indirectly accessed registers can configure
    register mapping to map those on virtual address range. During access to
    virtually mapped register range, indirect addressing is processed
    automatically, in following steps:
      1. selector for page or indirect register is updated (when needed);
      2. register in data window is accessed.
    
    Configuration should provide minimum and maximum register for virtual range,
    details of selector field for page selection, minimum and maximum register of
    data window for indirect access.
    
    Virtual range registers are managed by cache as well as direct access
    registers. In order to make indirect access more efficient, selector register
    should be declared as non-volatile, if possible.
    
    struct regmap_config is extended with the following:
    struct regmap_range_cfg	*ranges;
    unsigned int		n_ranges;
    
    [Also reordered debugfs init to later on since the cleanup code was
    conflicting with the new cleanup code for ranges anyway -- broonie]
    Signed-off-by: default avatarKrystian Garbaciak <krystian.garbaciak@diasemi.com>
    Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
    6863ca62
internal.h 4.66 KB