[U-Boot] [PATCH 1/2] mxc_ocotp: Do not disable the OCOTP clock after every access

Fabio Estevam festevam at gmail.com
Tue Nov 25 20:56:19 CET 2014


Hi Benoît,

On Tue, Nov 25, 2014 at 5:48 PM, Benoît Thébaudeau
<benoit.thebaudeau.dev at gmail.com> wrote:

> That, or:
>  - Make imx_get_mac_from_fuse() call enable_ocotp_clk(1) before
> reading the fuses, then call enable_ocotp_clk(0).

Yes, I started with this exact same approach as well. It works, but
Nitin told me he also had similiar issues with hab.

Other issue I see with such approach is that if people would try to
read the ocotp registers manually in the U-boot prompt (via md.l
command), then they will also get a hang.

>  - Make enable_ocotp_clk() return the clock initial state and store it
> in prepare_access(), then restore it in finish_access(). Same in
> imx_get_mac_from_fuse().

This would work as well, but with some more complexity. Still would
cause the hang via manual readings.

> Which of these 3 choices do you think would be the best?

I think the simplest one and the one that would be more general would
be the one proposed by this patch.

Regards,

Fabio Estevam


More information about the U-Boot mailing list