cfi 0001

Nicolas Pitre nico at cam.org
Tue Mar 21 11:08:18 EST 2006


On Tue, 21 Mar 2006, Tomas E wrote:

> Hi,
> 
> >> Nicolas Pitre <nico at cam.org> skrev den Mon, 20 Mar 2006 11:08:19 -0500 (EST):
> >> Hi,
> >> 
> >> > On Mon, 20 Mar 2006, Tomas E wrote:
> >> > 
> >> > > Hi,
> >> > > 
> >> > > I have a problem with writing to a Intel Strata flash
> >> > > and then doing a warm reset.
> >> > 
> >> > How do you "warm reset" ?
> >> 
> >> I use the at91rm9200 built in watchdog on a custom board, which is very
> >> convient but there is no external pin from the watchdog to make the
> >> a reset of the flash.
> >
> >You mean from include/asm-arm/arch-at91rm9200/system.h:
> >
> >static inline void arch_reset(char mode)
> >{
> >        /*
> >         * Perform a hardware reset with the use of the Watchdog timer.
> >         */
> >        at91_sys_write(AT91_ST_WDMR, AT91_ST_RSTEN | AT91_ST_EXTEN | 1);
> >        at91_sys_write(AT91_ST_CR, AT91_ST_WDRST);
> >}
> 
> Sorry if my explaination was poor but no. I run my test case
> which is to kill the watchdog deamon which will cause the watchdog
> to expire. I checked that this code will never be executed in my case.

The only answer I have for you then is to not rely on the watchdog at 
all since it cannot guarantee a reliable system recovery anyway.  Use it 
only if you have read-only flash.

Or, if you don't have to write to flash for the normal operation of your 
system except for some unfrequent occasions, then a simple workaround is 
simply to perform a small read of the MTD device right after the write 
has completed which will return the flash to data mode.

> The built in hardware watchdog on the at91rm9200 performs a cold reset 
> on all on chip periphials but does nothing on the external.

Otherwise, if the watchdog doesn't assert a reset line to which the 
flash is connected then it is not fulfilling its purpose and you shoud 
simply not use it at all.  The only exception is for the system reboot 
case where it is expected to fire only after things have been prepared 
for a clean reboot.


Nicolas




More information about the linux-mtd mailing list