public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] erase and saveenv stop working after using fw_setenv
@ 2008-09-16  7:46 Petri Lehtinen
  2008-09-16  9:04 ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Petri Lehtinen @ 2008-09-16  7:46 UTC (permalink / raw)
  To: u-boot

Hi!

I'm using U-Boot 1.3.4 and Linux 2.6.26.5 on MPC8323E-RDB. After using
fw_printenv in Linux, erase and saveenv stop working in U-Boot. In
Linux, fw_* still work.

When using erase, this is the result:

=> protect off fe040000 fe05ffff
Un-Protected 1 sectors
=> erase fe040000 fe05ffff

Flash erase error at address fe040000
Block Erase Error.
Block locked.
  done
Erased 1 sectors
=> md fe040000
fe040000: c7be9eae 626f6f74 636d643d 73657465    ....bootcmd=sete
fe040010: 6e762062 6f6f7461 72677320 726f6f74    nv bootargs root
...

So the sector doesn't get erased.

Errors are similar when using saveenv:

=> saveenv
Saving Environment to Flash...
Un-Protected 1 sectors
Erasing Flash...
Flash erase error at address fe040000
Block Erase Error.
Block locked.
  done
Erased 1 sectors

I tracked the error message down to cfi_flash.c, where this function
call fails:

   flash_isequal (info, sector, 0, FLASH_STATUS_DONE)

However, I have no clue on how CFI works, so my ability to debug it
further stops here. A possible reason I can think of is that the ioctl
calls in fw_setenv are somehow messing up the Flash status.

Any ideas?

-- 
Petri Lehtinen
Inoi Oy
Tel. : +358 40 758 0229
Email: petri.lehtinen at inoi.fi

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [U-Boot]  erase and saveenv stop working after using fw_setenv
@ 2008-09-16 11:36 yusuf khan
  0 siblings, 0 replies; 6+ messages in thread
From: yusuf khan @ 2008-09-16 11:36 UTC (permalink / raw)
  To: u-boot

> Message: 1
> Date: Tue, 16 Sep 2008 10:46:26 +0300
> From: Petri Lehtinen <petri.lehtinen@inoi.fi>
> Subject: [U-Boot] erase and saveenv stop working after using fw_setenv
> To: u-boot at lists.denx.de
> Message-ID: <48CF6452.40603@inoi.fi>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi!
>
> I'm using U-Boot 1.3.4 and Linux 2.6.26.5 on MPC8323E-RDB. After using
> fw_printenv in Linux, erase and saveenv stop working in U-Boot. In
> Linux, fw_* still work.
>
> When using erase, this is the result:
>
> => protect off fe040000 fe05ffff
> Un-Protected 1 sectors
> => erase fe040000 fe05ffff
>
> Flash erase error at address fe040000
> Block Erase Error.
> Block locked.
>   done
> Erased 1 sectors
> => md fe040000
> fe040000: c7be9eae 626f6f74 636d643d 73657465    ....bootcmd=sete
> fe040010: 6e762062 6f6f7461 72677320 726f6f74    nv bootargs root
> ...
>
> So the sector doesn't get erased.
>
> Errors are similar when using saveenv:
>
> => saveenv
> Saving Environment to Flash...
> Un-Protected 1 sectors
> Erasing Flash...
> Flash erase error at address fe040000
> Block Erase Error.
> Block locked.
>   done
> Erased 1 sectors
>
> I tracked the error message down to cfi_flash.c, where this function
> call fails:
>
>    flash_isequal (info, sector, 0, FLASH_STATUS_DONE)
>
> However, I have no clue on how CFI works, so my ability to debug it
> further stops here. A possible reason I can think of is that the ioctl
> calls in fw_setenv are somehow messing up the Flash status.
>
> Any ideas?
>
> --
> Petri Lehtinen
> Inoi Oy
> Tel. : +358 40 758 0229
> Email: petri.lehtinen at inoi.fi
>
>

Hi

I think it is the problem of hardware locking, try enabling
CFG_FLASH_PROTECTION .

-- 
Thanks & Regards

Yusuf A Khan
Multitech Software Systems
Koramangala,Bangalore

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-09-23 14:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-16  7:46 [U-Boot] erase and saveenv stop working after using fw_setenv Petri Lehtinen
2008-09-16  9:04 ` Wolfgang Denk
2008-09-16  9:47   ` Guennadi Liakhovetski
2008-09-16 10:06   ` Petri Lehtinen
2008-09-23 14:49   ` [U-Boot] [PATCH] mpc83xx: add h/w flash protection to board configs (was Re: erase and saveenv stop working after using fw_setenv) Kim Phillips
  -- strict thread matches above, loose matches on Subject: below --
2008-09-16 11:36 [U-Boot] erase and saveenv stop working after using fw_setenv yusuf khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox