cfi 0001

Nicolas Pitre nico at cam.org
Mon Mar 20 17:35:43 EST 2006


On Mon, 20 Mar 2006, Tomas wrote:

> 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);
}

then it is usually called from machine_restart() in 
arch/arm/kernel/process.c...

which is called from kernel_restart() in kernel/sys.c...

But kernel_restart() has called kernel_restart_prepare() which calls 
notifier_call_chain(&reboot_notifier_list, SYS_RESTART, cmd)...
 
And incidentally one of those reboot notifiers is cfi_intelext_reboot() 
in drivers/mtd/chips/cfi_cmdset_0001.c which calls cfi_intelext_reset() 
... which has this comment:

		/* force the completion of any ongoing operation
		   and switch to array mode so any bootloader in
		   flash is accessible for soft reboot. */

That looks like what you need already.


Nicolas




More information about the linux-mtd mailing list