The exact efuse size is defined in property <reg> before, this assume
that the length of registers is equal to efuse size, but it not true
for some chips, so we need anothor property to redefine efuse size.
Change-Id: I9cdab8adc2a13b55cfcacc3c2248295c4387a806
Signed-off-by: Chen Liang <cl@rock-chips.com>
- 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
return PTR_ERR(efuse->clk);
efuse->dev = &pdev->dev;
- econfig.size = resource_size(res);
+ if (of_property_read_u32_index(dev->of_node,
+ "rockchip,efuse-size",
+ 0,
+ &econfig.size))
+ econfig.size = resource_size(res);
+
econfig.reg_read = match->data;
econfig.priv = efuse;
econfig.dev = efuse->dev;