When trying to read the efuse of the RK3188 a segfault is raised when the following line is called in rockchip_rk3288_efuse_read: *buf++ = readb(efuse->base + REG_EFUSE_DOUT); It appears that the problem here might be the use of readb, which I suspect is triggering an unaligned access. Changing this to readl resolves the issue (as is done in rockchip_rk3399_efuse_read). >From 9923a6889aa325faf842a6757c9f9bd0f0195acb Mon Sep 17 00:00:00 2001 From: Amr Bekhit <amr@xxxxxxxxxxx> Date: Sat, 5 Oct 2019 10:45:17 +0300 Subject: [PATCH] Fix segfault in rockchip_rk3288_efuse_read by using readl instead of readb when reading REG_EFUSE_DOUT. Signed-off-by: Amr Bekhit <amr@xxxxxxxxxxx> --- drivers/nvmem/rockchip-efuse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c index e4579de5d014..f680a80d81cf 100644 --- a/drivers/nvmem/rockchip-efuse.c +++ b/drivers/nvmem/rockchip-efuse.c @@ -78,7 +78,7 @@ static int rockchip_rk3288_efuse_read(void *context, unsigned int offset, writel(readl(efuse->base + REG_EFUSE_CTRL) | RK3288_STROBE, efuse->base + REG_EFUSE_CTRL); udelay(1); - *buf++ = readb(efuse->base + REG_EFUSE_DOUT); + *buf++ = readl(efuse->base + REG_EFUSE_DOUT); writel(readl(efuse->base + REG_EFUSE_CTRL) & (~RK3288_STROBE), efuse->base + REG_EFUSE_CTRL); udelay(1); -- 2.20.1 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/linux-rockchip