This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: [PATCH] Intel StrataFlash fix for MIPS
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Thomas Koeller <thomas dot koeller at baslerweb dot com>
- Cc: ecos-patches at sources dot redhat dot com
- Date: Tue, 8 Feb 2005 21:15:27 +0100
- Subject: Re: [PATCH] Intel StrataFlash fix for MIPS
- References: <200501141419.25818.thomas.koeller@baslerweb.com>
On Fri, Jan 14, 2005 at 02:19:25PM +0100, Thomas Koeller wrote:
> HI,
>
> when using the Intel StrataFlash driver on my MIPS platform, I
> encountered the following problem:
>
> In flash_query(), which is executing from RAM, the flash chip is
> returned to array mode by writing the control code FLASH_Reset
> (0xff) immediatly before return. The actual write operation can
> be (and in my case, was) delayed until after the return, because
> the processor's bus interface schedules opcode fetches and load/
> store operations independently. The effect is that instructions
> ar fetched from flash, while the flash is still in query mode.
>
> Since the processor guarantees execution of load/store operations
> in program order, a dummy read fixes this. It took me a while to
> notice that neither HAL_REORDER_BARRIER() nor HAL_IO_BARRIER()
> (the latter does not even exist for MIPS) address this particular
> problem. AFAICT there is nothing in ecos that does, or am I missing
> something here?
>
> The attached patch, besides fixing the probler dscribed above, also
> cleans up a minor issue that caused the FLASH_Reset code not to be
> written to flash offset 0. This did not cause any harm, but is
> somewhat unclean and confusing.
Commit,
Andrew