summaryrefslogtreecommitdiffstats
path: root/drivers/nvmem
diff options
context:
space:
mode:
authorFinley Xiao <finley.xiao@rock-chips.com>2017-12-15 14:06:08 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-19 10:39:33 +0100
commit32277723ba7e9af0201df2341a3e71ea27605759 (patch)
tree670d79bbc4414fc81b6dfc50280f01e96c82db07 /drivers/nvmem
parent683618b0639387c5eda79b2f2753c35f3dd648d7 (diff)
downloadlinux-32277723ba7e9af0201df2341a3e71ea27605759.tar.bz2
nvmem: rockchip-efuse: parse 'rockchip,efuse-size'
The eFuse size is defined in property <reg> before, but the length of registers is not equal to the size on some platforms, so we add a new property to redefine it. Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem')
-rw-r--r--drivers/nvmem/rockchip-efuse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
index 123de77ca5d6..a91372816c0a 100644
--- a/drivers/nvmem/rockchip-efuse.c
+++ b/drivers/nvmem/rockchip-efuse.c
@@ -217,7 +217,9 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
return PTR_ERR(efuse->clk);
efuse->dev = &pdev->dev;
- econfig.size = resource_size(res);
+ if (of_property_read_u32(dev->of_node, "rockchip,efuse-size",
+ &econfig.size))
+ econfig.size = resource_size(res);
econfig.reg_read = match->data;
econfig.priv = efuse;
econfig.dev = efuse->dev;