[PATCH] imx6: ocotp: Add On-Chip OTP registers write support

Uladzimir Bely u.bely at sam-solutions.net
Thu Apr 10 10:07:19 EDT 2014


Hello, Sasha.

It seems I've fixed all according your remarks instead of one question.

10.04.2014 09:16, Sascha Hauer пишет:
> 
> As suggested in my last mail:
> 
> Do we need this tool at all? We can add a .macaddr parameter to the
> ocotp device using dev_add_param_mac() (This function is new and
> currently only in the -next branch)
> 

How can we to use such parameters (even not macaddr, just bool)?

For example, I'm trying just to add bool parameter in imx_ocotp_probe(),
for additional FUSE write protection:

> if (IS_ENABLED(CONFIG_IMX_OCOTP_WRITE)) {
> 	dev_add_param_bool(dev, "permanent_write_enable",
> 		NULL, NULL, &priv->write_enable, NULL);
> }

and check priv->write_enable instead of CONFIG_IMX_OCOTP_WRITE in write function.

But how to set permanent_write_enable to 1 in barebox shell?
As I understand, it should be something like ocotp0.permanent_write_enable=1,
but I don't see any similar.

If I add

> add_generic_device("ocotp", 0, NULL, MX6_OCOTP_BASE_ADDR, 0x2000,
> 		   IORESOURCE_MEM, NULL);

to board.c, I see something like 21bc000.ocotp.write_enable= available, but
21bc000.ocotp.write_enable=1 or 21bc000.ocotp.write_enable=0 doesn't work,
saying "No such file or directory".

Also, as I understand, it's an incorrect in field of using devicetree.


One more question: is there any way in barebox shell to write to character device
with offset? For example, ocotptool just writes (reads) 8 bytes to ocotp cdev with offset
0x22*4 (MAC offset). How to do it from shell?

-- 
With regards,
Uladzimir Bely.




More information about the barebox mailing list