Commit 32277723 authored by Finley Xiao's avatar Finley Xiao Committed by Greg Kroah-Hartman
Browse files

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: default avatarFinley Xiao <finley.xiao@rock-chips.com>
Acked-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 683618b0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -12,6 +12,10 @@ Required properties:
- clocks: Should be the clock id of eFuse
- clock-names: Should be "pclk_efuse"

Optional properties:
- rockchip,efuse-size: Should be exact eFuse size in byte, the eFuse
  size in property <reg> will be invalid if define this property.

Deprecated properties:
- compatible: "rockchip,rockchip-efuse"
  Old efuse compatible value compatible to rk3066a, rk3188 and rk3288
+3 −1
Original line number Diff line number Diff line
@@ -217,6 +217,8 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
		return PTR_ERR(efuse->clk);

	efuse->dev = &pdev->dev;
	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;