mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 17:46:47 +07:00
regmap: cache: speed regcache_hw_init() up.
This may speed regcache_hw_init() up for some cases that there has volatile registers. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
ba3f1c85a6
commit
fbba43c527
@ -71,9 +71,9 @@ static int regcache_hw_init(struct regmap *map)
|
||||
/* fill the reg_defaults */
|
||||
map->num_reg_defaults = count;
|
||||
for (i = 0, j = 0; i < map->num_reg_defaults_raw; i++) {
|
||||
val = regcache_get_val(map, map->reg_defaults_raw, i);
|
||||
if (regmap_volatile(map, i * map->reg_stride))
|
||||
continue;
|
||||
val = regcache_get_val(map, map->reg_defaults_raw, i);
|
||||
map->reg_defaults[j].reg = i * map->reg_stride;
|
||||
map->reg_defaults[j].def = val;
|
||||
j++;
|
||||
|
Loading…
Reference in New Issue
Block a user