public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Tomas <Tomas2003@home.se>
To: Nicolas Pitre <nico@cam.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Re: cfi 0001
Date: Wed, 22 Mar 2006 23:46:09 +0100	[thread overview]
Message-ID: <ops6t6u7t8oeqxpi@privat.utfors.se> (raw)
In-Reply-To: <Pine.LNX.4.64.0603211056190.3631@localhost.localdomain>

Hi,

I used a web client due to some mail problem, seem to mess up.

Nicolas Pitre <nico@cam.org> skrev den Tue, 21 Mar 2006 11:08:18 -0500 
(EST):

> On Tue, 21 Mar 2006, Tomas E wrote:
>
>> Hi,
>>
>> >> Nicolas Pitre <nico@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);
>> >}

The above works fine with the latest snapshot.

My problem is as you and others pointed out that I got a cold reset
on the chip but not on the flash. I will put a working watchdog
on the wich list.

>>
>> 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.

Yes this is my case and I have now put in this which minimize the time
when the flash is unreadable.

I was thinking that I might put in a watchdog isr that could put the flash
in read mode again and then do same as the arch_reset. But I guess that I
cannot call cfi_intelext_reboot() or similar from a isr because of 
deadlock risk.
And and other problem is that it might not work if the program code for
the isr is corrupt.

>
>> 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
>
>

Thank for explaining, Tomas

  reply	other threads:[~2006-03-22 22:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-21  7:35 Re: cfi 0001 Tomas E
2006-03-21 16:08 ` Nicolas Pitre
2006-03-22 22:46   ` Tomas [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-03-21  7:20 Tomas E

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ops6t6u7t8oeqxpi@privat.utfors.se \
    --to=tomas2003@home.se \
    --cc=linux-mtd@lists.infradead.org \
    --cc=nico@cam.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox