diff options
author | Chen-Yu Tsai <wens@csie.org> | 2019-04-13 11:32:50 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-25 19:43:11 +0200 |
commit | de2a3eaea552f2d562fae46bd495eb83298a1b3c (patch) | |
tree | 38ada939657cc218d0732829eb5413bd7d347abe /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 9c4adfb5dc1326f94d3e212a8b5dfb238839b9ae (diff) |
nvmem: sunxi_sid: Optimize register read-out method
SID cells are 32-bit aligned, and a multiple of 32 bits in length. The
only outlier is the thermal sensor calibration data, which is 16 bits
per sensor. However a whole 64 bits is allocated for this purpose, so
we could consider it conforming to the rule above.
Also, the register read-out method assumes native endian, unlike the
direct MMIO method, which assumes big endian. Thus no endian conversion
is involved.
Under these assumptions, the register read-out method can be slightly
optimized. Instead of reading one word then discarding 3 bytes, read
the whole word directly into the buffer. However, for reads under 4
bytes or trailing bytes, we still use a scratch buffer to extract the
requested bytes.
We could go one step further if .word_size was 4, but changing that
would affect the sysfs interface's behavior.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions