
Hi John,
On 2023-04-17 18:09, John Keeping wrote:
Update rk3399 to match the pattern in the other device-specific implementations to ensure the previous address is cleared when reading multiple blocks.
Does this fix a real issue for you?
Compared to the other device-specific implementations this reg behaves differently on RK3399. The addr field is not read back, or it gets auto-cleared when EFUSE_STROBE is cleared, the use of clrsetbits_le32 may mislead that this reg holds the addr value from prior iteration.
Regards, Jonas
Signed-off-by: John Keeping john@metanate.com
drivers/misc/rockchip-efuse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/rockchip-efuse.c b/drivers/misc/rockchip-efuse.c index 2f96b79ea4..d302271239 100644 --- a/drivers/misc/rockchip-efuse.c +++ b/drivers/misc/rockchip-efuse.c @@ -207,8 +207,8 @@ static int rockchip_rk3399_efuse_read(struct udevice *dev, int offset, udelay(1);
while (size--) {
setbits_le32(efuse->base + EFUSE_CTRL,
EFUSE_STROBE | RK3399_ADDR(offset++));
clrsetbits_le32(efuse->base + EFUSE_CTRL, RK3399_A_MASK,
udelay(1); *buffer++ = readl(efuse->base + EFUSE_DOUT); clrbits_le32(efuse->base + EFUSE_CTRL, EFUSE_STROBE);EFUSE_STROBE | RK3399_ADDR(offset++));