|
@@ -38,10 +38,11 @@ static int regcache_hw_init(struct regmap *map)
|
|
|
|
|
|
/* calculate the size of reg_defaults */
|
|
/* calculate the size of reg_defaults */
|
|
for (count = 0, i = 0; i < map->num_reg_defaults_raw; i++)
|
|
for (count = 0, i = 0; i < map->num_reg_defaults_raw; i++)
|
|
- if (!regmap_volatile(map, i * map->reg_stride))
|
|
|
|
|
|
+ if (regmap_readable(map, i * map->reg_stride) &&
|
|
|
|
+ !regmap_volatile(map, i * map->reg_stride))
|
|
count++;
|
|
count++;
|
|
|
|
|
|
- /* all registers are volatile, so just bypass */
|
|
|
|
|
|
+ /* all registers are unreadable or volatile, so just bypass */
|
|
if (!count) {
|
|
if (!count) {
|
|
map->cache_bypass = true;
|
|
map->cache_bypass = true;
|
|
return 0;
|
|
return 0;
|