Hi Mario, On Tue, 31 Jul 2018 12:01:04 +0200 Mario Six mario....@gdsys.cc wrote:
> The regmap functions currently assume that all register map accesses > have a data width of 32 bits, but there are maps that have different > widths. > > To rectify this, implement the regmap_raw_read and regmap_raw_write > functions from the Linux kernel API that specify the width of a desired > read or write operation on a regmap. > > Implement the regmap_read and regmap_write functions using these raw > functions in a backwards-compatible manner. > > Signed-off-by: Mario Six <mario....@gdsys.cc> Reviewed-by: Anatolij Gustschin <ag...@denx.de> Please see some comments below. ... > +int regmap_raw_read(struct regmap *map, uint offset, void *valp, size_t > val_len) > +{ > + void *ptr; > + > + ptr = map_physmem(map->ranges[0] + offset, val_len, MAP_NOCACHE); shouldn't this be ptr = map_physmem(map->ranges[0].start + offset, val_len, MAP_NOCACHE); ? It works as is, but it is better to be explicit about the start address. ... > +int regmap_raw_write(struct regmap *map, uint offset, const void *val, > + size_t val_len) > +{ > + void *ptr; > + > + ptr = map_physmem(map->ranges[0] + offset, val_len, MAP_NOCACHE); map->ranges[0].start + offset ? -- Anatolij _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot