mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 22:52:35 +02:00
nvmem: rockchip-efuse: add optional property to get efuse size
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>
This commit is contained in:
parent
8c606fb4f6
commit
976deff0db
|
|
@ -13,6 +13,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
|
||||
|
|
|
|||
|
|
@ -361,7 +361,12 @@ static int __init 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_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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user