diff options
| author | David E. Garcia Porras <[email protected]> | 2026-04-03 14:29:03 -0600 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2026-05-11 11:49:59 +0530 |
| commit | 8536a351fd3af50e5eba571e562a33247b99870d (patch) | |
| tree | 031e267432fd5da819e88e25e17e8fc4ccfcbc97 /scripts/create-binary-archive.sh | |
| parent | 65bb705f7b59d8f2a5683160f31db15b4e2c64d7 (diff) | |
lib: utils/regmap: Fix reg_stride calculation in syscon regmap
The reg_stride field represents the address stride in bytes between
consecutive registers. The Linux kernel regmap framework validates
register accesses using IS_ALIGNED(reg, map->reg_stride) as an address
alignment check (drivers/base/regmap/regmap.c). The Linux kernel syscon
driver (drivers/mfd/syscon.c) sets reg_stride directly to reg_io_width:
syscon_config.reg_stride = reg_io_width;
The current OpenSBI code incorrectly multiplies reg_io_width by 8,
converting a byte value to bits. Fix this by using reg_io_width directly
as the stride value, consistent with the Linux kernel.
Fixes: f21d8f7d5911 ("lib: utils/regmap: Add simple FDT based syscon regmap driver")
Signed-off-by: David E. Garcia Porras <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Anup Patel <[email protected]>
Diffstat (limited to 'scripts/create-binary-archive.sh')
0 files changed, 0 insertions, 0 deletions
