linux/drivers/nvmem
Chen-Yu Tsai de2a3eaea5 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>
2019-04-25 19:43:11 +02:00
..
bcm-ocotp.c nvmem: bcm-ocotp: Add ACPI support to BCM OCOTP 2019-01-31 16:24:14 +01:00
core.c nvmem: core: don't check the return value of notifier chain call 2019-02-19 14:50:11 +01:00
imx-iim.c nvmem: imx-iim: Do not use "&pdev->dev" explicitly 2018-03-14 19:28:14 +01:00
imx-ocotp.c nvmem: imx-ocotp: add support for imx8mq 2019-04-25 19:43:11 +02:00
Kconfig nvmem: imx-ocotp: broaden Kconfig dependency 2019-04-25 19:43:11 +02:00
lpc18xx_eeprom.c nvmem: lpc18xx_eeprom: remove unused variable 2018-10-15 15:56:15 +02:00
lpc18xx_otp.c nvmem: lpc18xx_otp: Convert to use devm_nvmem_register() 2018-03-14 19:28:14 +01:00
Makefile nvmem: zynqmp: Added zynqmp nvmem firmware driver 2019-02-05 13:23:22 +01:00
meson-efuse.c nvmem: meson-efuse: add peripheral clock 2018-12-06 15:45:46 +01:00
meson-mx-efuse.c nvmem: meson-mx-efuse: Convert to use devm_nvmem_register() 2018-03-14 19:28:14 +01:00
mtk-efuse.c headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
mxs-ocotp.c nvmem: mxs-ocotp: use devm_nvmem_register() 2018-09-28 15:14:54 +02:00
qfprom.c headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
rave-sp-eeprom.c nvmem: rave-sp-eeprom: Remove VLA usage 2018-07-07 17:30:46 +02:00
rockchip-efuse.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
sc27xx-efuse.c nvmem: sc27xx: Convert nvmem offset to block index 2019-01-31 16:24:14 +01:00
snvs_lpgpr.c nvmem: add i.MX7 support to snvs-lpgpr 2018-03-14 19:28:14 +01:00
sunxi_sid.c nvmem: sunxi_sid: Optimize register read-out method 2019-04-25 19:43:11 +02:00
uniphier-efuse.c headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
vf610-ocotp.c nvmem: vf610-ocotp: Do not use "&pdev->dev" explicitly 2018-03-14 19:28:14 +01:00
zynqmp_nvmem.c nvmem: zynqmp: Added zynqmp nvmem firmware driver 2019-02-05 13:23:22 +01:00