This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Flash detection


On Tue, 2003-11-11 at 03:07, M.Eugenia G.Valdecasas wrote:
> > > The configuration lines are:
> > >
> > > in altair_strataflash.inl->
> > >
> > > #define CYGNUM_FLASH_DEVICES     (2)
> > > #define CYGNUM_FLASH_BASE        (0x00000000u)
> > > #define CYGNUM_FLASH_BASE_MASK   (0xFE000000u) // 2 * 16Mb devices
> > > > #define CYGNUM_FLASH_WIDTH       (16)
> > > > #define CYGNUM_FLASH_BLANK       (1)
> > > >
> > > > #define FLASH_P2V(x) ((volatile flash_t *)(((unsigned)(x) <
> > 0x1000) ? \
> > > >                              ((unsigned)(x) | 0xa0000000) : \
> > > >                              (unsigned)(x)))
> > > >
> > >
> 
> > Why do you have this code?  I think it was only necessary on the
> > IQ80321
> > and definitely *not* on the PXA25x
> 
> If I substitude this code for
> #define FLASH_P2V(x) (unsigned)(x)
> 
> The exit on the console would be:
> 
> +$T0a0f:08f0efa3;0d:d8ca00a0;#a7
> 
> and would repeat the same line every time I press a key.

First of all, this is RedBoot falling into GDB mode, indicating that
you are accessing invalid memory.  I think you have other configuration
or setup issues here.

On most ARM platforms, PXA25x based ones included, the hardware has
FLASH at 0x00000000 (as you write above), but eCos immediately uses
the MMU to remap this to some other address.  

For example,  on the uE250 (PXA250) the FLASH is at *logical* address 
0x50000000 and this is the address used by the FLASH drivers.  You'll
have to figure out the appropriate address to use, based on how memory
is being remapped.

> 
> Also I tried to apply the patch for strataflash:
> 2003-05-02 	Jani Monoses
> 
> but it gave me this answer as well:
> +$T0a0f:08f0efa3;0d:d8ca00a0;#a7
> 
> Do I have to apply other patches?
> 
> I know I take ok the data of the flash (manufacturer code, qry etc...) 
> but somehow somewhere between the cache enable and cache disable, this 
> data is lost... does it make anysense what I am saying???
> 
> Why would it jump out of this condition
>   if ( (qp->manuf_code == FLASH_Intel_code) &&
> 	(strncmp(qp->id, "QRY", 3) == 0))
> 
> if the data that the flash sends is correct???? 
> I am out of ideas....
-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]