Re: [U-Boot] [PATCH 2/3] mxs_ocotp: check for errors from the OTP controller after writing

2014-12-01 Thread Stefano Babic
On 21/11/2014 17:54, Hector Palacios wrote: > The write operation may fail when trying to write to a locked area. In > this case the ERROR bit is set in the CTRL register. Check for that > condition and return an error. > > Signed-off-by: Hector Palacios > --- > drivers/misc/mxs_ocotp.c | 7

Re: [U-Boot] [PATCH 2/3] mxs_ocotp: check for errors from the OTP controller after writing

2014-11-22 Thread Fabio Estevam
On Sat, Nov 22, 2014 at 5:29 PM, Fabio Estevam wrote: > On Fri, Nov 21, 2014 at 4:04 PM, Hector Palacios > wrote: > >>> What about doing this instead? >>> >>>/* Check for errors */ >>>ret = readl(&ocotp_regs->hw_ocotp_ctrl) & OCOTP_CTRL_ERROR); >>>if (ret) { >>>

Re: [U-Boot] [PATCH 2/3] mxs_ocotp: check for errors from the OTP controller after writing

2014-11-22 Thread Fabio Estevam
On Fri, Nov 21, 2014 at 2:54 PM, Hector Palacios wrote: > The write operation may fail when trying to write to a locked area. In > this case the ERROR bit is set in the CTRL register. Check for that > condition and return an error. > > Signed-off-by: Hector Palacios Reviewed-by: Fabio Estevam _

Re: [U-Boot] [PATCH 2/3] mxs_ocotp: check for errors from the OTP controller after writing

2014-11-22 Thread Fabio Estevam
On Fri, Nov 21, 2014 at 4:04 PM, Hector Palacios wrote: >> What about doing this instead? >> >>/* Check for errors */ >>ret = readl(&ocotp_regs->hw_ocotp_ctrl) & OCOTP_CTRL_ERROR); >>if (ret) { >>printfs("Failed writing the fuses: %d\n", ret); >>

Re: [U-Boot] [PATCH 2/3] mxs_ocotp: check for errors from the OTP controller after writing

2014-11-21 Thread Hector Palacios
Hi Fabio, On 11/21/2014 06:10 PM, Fabio Estevam wrote: > Hi Hector, > > On Fri, Nov 21, 2014 at 2:54 PM, Hector Palacios > wrote: >> The write operation may fail when trying to write to a locked area. In >> this case the ERROR bit is set in the CTRL register. Check for that >> condition and retu

Re: [U-Boot] [PATCH 2/3] mxs_ocotp: check for errors from the OTP controller after writing

2014-11-21 Thread Fabio Estevam
Hi Hector, On Fri, Nov 21, 2014 at 2:54 PM, Hector Palacios wrote: > The write operation may fail when trying to write to a locked area. In > this case the ERROR bit is set in the CTRL register. Check for that > condition and return an error. > > Signed-off-by: Hector Palacios > --- > drivers/m

[U-Boot] [PATCH 2/3] mxs_ocotp: check for errors from the OTP controller after writing

2014-11-21 Thread Hector Palacios
The write operation may fail when trying to write to a locked area. In this case the ERROR bit is set in the CTRL register. Check for that condition and return an error. Signed-off-by: Hector Palacios --- drivers/misc/mxs_ocotp.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers