summaryrefslogtreecommitdiff
path: root/include/regmap.h
diff options
context:
space:
mode:
authorPratyush Yadav <p.yadav@ti.com>2020-09-24 07:34:15 +0300
committerTom Rini <trini@konsulko.com>2020-09-30 18:55:22 +0300
commitd8babb9598ce237ffb1feccb576c66a21c52e5f7 (patch)
tree24983e341b4a5303ef72f3f533bd7e746a4f32b0 /include/regmap.h
parent0e01a7c3f4b6a42f768a19f7fc1df92d3e3b5d37 (diff)
downloadu-boot-d8babb9598ce237ffb1feccb576c66a21c52e5f7.tar.xz
regmap: Allow devices to specify regmap range start and size in config
Some devices need to calculate the regmap base address at runtime. This makes it impossible to use device tree to get the regmap base. Instead, allow devices to specify it in the regmap config. This will create a regmap with a single range that corresponds to the start and size given by the driver. Signed-off-by: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/regmap.h')
-rw-r--r--include/regmap.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/regmap.h b/include/regmap.h
index 7c8ad04759..7a6fcc7f53 100644
--- a/include/regmap.h
+++ b/include/regmap.h
@@ -84,10 +84,16 @@ struct regmap_bus;
* REGMAP_SIZE_32 if set to 0.
* @reg_offset_shift Left shift the register offset by this value before
* performing read or write.
+ * @r_start: If specified, the regmap is created with one range
+ * which starts at this address, instead of finding the
+ * start from device tree.
+ * @r_size: Same as above for the range size
*/
struct regmap_config {
enum regmap_size_t width;
u32 reg_offset_shift;
+ ulong r_start;
+ ulong r_size;
};
/**