Rockchip RK3188 I2C driver
Max Schwarz
max.schwarz at online.de
Fri Apr 18 02:30:21 PDT 2014
On Friday 18 April 2014 at 11:06:56, Heiko Stübner wrote:
> > I think Heiko and I have been operating under the misconception that
> > caching is somehow enabled by default - which is not the case. Thanks for
> > clearing that up ;-)
>
> Actually I think it's the other way around :-).
>
> See regmap_read() calling _reagmap_read(), which in turn calls
> regcache_read(), except when map->cache_bypass is enabled, which then checks
> the volatile setting for the individual register.
But map->cache_bypass *is* enabled by regcache_init() in regcache.c when
cache_type is REGCACHE_NONE, which is the default value:
if (map->cache_type == REGCACHE_NONE) {
map->cache_bypass = true;
return 0;
}
You can see the behaviour in detail if you compile with event tracing and boot
with trace_event=regmap:* .
If you think about it, it would be quite insane to enable caching in syscon
without knowing anything about the registers.
Cheers,
Max
More information about the linux-arm-kernel
mailing list