diff options
author | Tom Rini <trini@konsulko.com> | 2020-06-13 09:01:01 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-06-13 09:01:01 -0400 |
commit | f9e3d2e147ee3b18dbc09e56d13e6fc8758ac375 (patch) | |
tree | bd93f43be8a3ea14724aeb5686fbdcb80125623e /drivers/core/regmap.c | |
parent | 8a1292ce3e21205645a155b23ac083a3fc6b64c1 (diff) | |
parent | cea8f2c995b9d87af6ef42f967402e1c8a3506db (diff) |
Merge tag 'dm-pull-12jun20' of git://git.denx.de/u-boot-dm into next
patman improvements to allow it to work with Zephyr
change to how sequence numbers are assigned to devices
minor fixes and improvements
Diffstat (limited to 'drivers/core/regmap.c')
-rw-r--r-- | drivers/core/regmap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c index 4a214eff7c..a67a237b88 100644 --- a/drivers/core/regmap.c +++ b/drivers/core/regmap.c @@ -310,13 +310,13 @@ int regmap_raw_read_range(struct regmap *map, uint range_num, uint offset, } range = &map->ranges[range_num]; - ptr = map_physmem(range->start + offset, val_len, MAP_NOCACHE); - if (offset + val_len > range->size) { debug("%s: offset/size combination invalid\n", __func__); return -ERANGE; } + ptr = map_physmem(range->start + offset, val_len, MAP_NOCACHE); + switch (val_len) { case REGMAP_SIZE_8: *((u8 *)valp) = __read_8(ptr, map->endianness); @@ -419,13 +419,13 @@ int regmap_raw_write_range(struct regmap *map, uint range_num, uint offset, } range = &map->ranges[range_num]; - ptr = map_physmem(range->start + offset, val_len, MAP_NOCACHE); - if (offset + val_len > range->size) { debug("%s: offset/size combination invalid\n", __func__); return -ERANGE; } + ptr = map_physmem(range->start + offset, val_len, MAP_NOCACHE); + switch (val_len) { case REGMAP_SIZE_8: __write_8(ptr, val, map->endianness); |