linux-next/drivers/nvmem
Sascha Hauer eaeac7f680 nvmem: imx-ocotp-ele: fix reading from non zero offset
In imx_ocotp_reg_read() the offset comes in as bytes and not as words.
This means we have to divide offset by 4 to get to the correct word
offset.

Also the incoming offset might not be word aligned. In order to read
from the OCOTP the driver aligns down the previous word boundary and
reads from there. This means we have to skip this alignment offset from
the temporary buffer when copying the data to the output buffer.

Fixes: 22e9e6fcfb ("nvmem: imx: support i.MX93 OCOTP")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: stable <stable@kernel.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
2024-12-10 13:51:22 +00:00
..
layouts nvmem: layouts: add U-Boot env layout 2024-09-11 16:05:15 +02:00
apple-efuses.c nvmem: add missing MODULE_DESCRIPTION() macros 2024-07-05 09:55:04 +02:00
bcm-ocotp.c nvmem: Explicitly include correct DT includes 2023-08-23 16:34:01 +02:00
brcm_nvram.c nvmem: Correct some typos in comments 2024-11-05 05:33:47 +01:00
core.c Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
imx-iim.c nvmem: imx-iim: Convert comma to semicolon 2024-11-05 05:33:47 +01:00
imx-ocotp-ele.c nvmem: imx-ocotp-ele: fix reading from non zero offset 2024-12-10 13:51:22 +00:00
imx-ocotp-scu.c nvmem: add explicit config option to read old syntax fixed OF cells 2023-10-21 19:19:06 +02:00
imx-ocotp.c nvmem: Move and rename ->fixup_cell_info() 2023-12-15 13:30:07 +01:00
internals.h nvmem: core: Expose cells through sysfs 2023-12-15 13:30:08 +01:00
jz4780-efuse.c nvmem: jz4780-efuse: Use PTR_ERR_OR_ZERO() to simplify code 2020-05-15 16:20:02 +02:00
Kconfig nvmem: Add R-Car E-FUSE driver 2024-11-05 05:33:46 +01:00
lan9662-otpc.c nvmem: lan9662-otp: Change return type of lan9662_otp_wait_flag_clear() 2022-11-22 18:22:05 +01:00
layerscape-sfp.c nvmem: sfp: Add support for TA 2.1 devices 2022-05-09 15:46:29 +02:00
layouts.c nvdimm: Use of_property_present() and of_property_read_bool() 2024-08-21 16:06:43 -05:00
lpc18xx_eeprom.c nvmem: lpc18xx_eeprom: Convert to platform remove callback returning void 2024-05-03 07:26:38 +02:00
lpc18xx_otp.c nvmem: Correct some typos in comments 2024-11-05 05:33:47 +01:00
Makefile nvmem: Add R-Car E-FUSE driver 2024-11-05 05:33:46 +01:00
meson-efuse.c Char/Misc and other driver changes for 6.11-rc1 2024-07-19 15:55:08 -07:00
meson-mx-efuse.c nvmem: meson-mx-efuse: Remove nvmem_device from efuse struct 2024-05-03 07:26:39 +02:00
microchip-otpc.c nvmem: Correct some typos in comments 2024-11-05 05:33:47 +01:00
mtk-efuse.c nvmem: mtk-efuse: Drop NVMEM device name 2024-03-07 20:21:53 +00:00
mxs-ocotp.c nvmem: Use device_get_match_data() 2023-10-21 19:19:15 +02:00
nintendo-otp.c nvmem: nintendo-otp: Use devm_platform_ioremap_resource() 2023-04-05 19:41:12 +02:00
qcom-spmi-sdam.c nvmem: add explicit config option to read old syntax fixed OF cells 2023-10-21 19:19:06 +02:00
qfprom.c nvmem: add explicit config option to read old syntax fixed OF cells 2023-10-21 19:19:06 +02:00
qoriq-efuse.c nvmem: add new NXP QorIQ eFuse driver 2023-08-23 16:34:01 +02:00
rave-sp-eeprom.c nvmem: add explicit config option to read old syntax fixed OF cells 2023-10-21 19:19:06 +02:00
rcar-efuse.c nvmem: Add R-Car E-FUSE driver 2024-11-05 05:33:46 +01:00
rmem.c nvmem: rmem: Fix return value of rmem_read() 2024-07-03 16:37:51 +02:00
rockchip-efuse.c nvmem: rockchip-efuse: set type to OTP 2024-07-05 09:55:04 +02:00
rockchip-otp.c nvmem: rockchip-otp: Set type to OTP 2024-07-05 09:55:04 +02:00
sc27xx-efuse.c nvmem: sc27xx: fix module autoloading 2024-05-03 07:26:38 +02:00
sec-qfprom.c nvmem: add explicit config option to read old syntax fixed OF cells 2023-10-21 19:19:06 +02:00
snvs_lpgpr.c nvmem: Explicitly include correct DT includes 2023-08-23 16:34:01 +02:00
sprd-efuse.c nvmem: sprd: fix module autoloading 2024-05-03 07:26:38 +02:00
stm32-bsec-optee-ta.c nvmem: stm32: add OP-TEE support for STM32MP13x 2023-02-06 19:06:59 +01:00
stm32-bsec-optee-ta.h nvmem: stm32: add OP-TEE support for STM32MP13x 2023-02-06 19:06:59 +01:00
stm32-romem.c nvmem: stm32: add support for STM32MP25 BSEC to control OTP data 2023-12-15 13:30:08 +01:00
sunplus-ocotp.c nvmem: sunplus-ocotp: Use devm_platform_ioremap_resource_byname() helper function 2024-09-03 12:13:23 +02:00
sunxi_sid.c nvmem: add explicit config option to read old syntax fixed OF cells 2023-10-21 19:19:06 +02:00
u-boot-env.c nvmem: layouts: add U-Boot env layout 2024-09-11 16:05:15 +02:00
uniphier-efuse.c nvmem: add explicit config option to read old syntax fixed OF cells 2023-10-21 19:19:06 +02:00
vf610-ocotp.c nvmem: vf610-ocotp: Use devm_platform_get_and_ioremap_resource() 2023-04-05 19:41:13 +02:00
zynqmp_nvmem.c nvmem: zynqmp_nvmem: Add support to access efuse 2024-03-07 20:21:53 +00:00