This is the mail archive of the ecos-patches@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: Intel FLASH


> -----Original Message-----
> From: Jani Monoses [mailto:jani@iv.ro] 
> the datasheet I have lists W parts as having 0x5X ids...strange
The device I have reports 0x6X, consistent with the data sheet, and also
consistent with the Micro (who provides a second source, right down to the
device ID, part for Intel) datasheet.
Oh well

> 
> > 
> > // Secret decoder ring:
> > // CYGOPT_FLASH_IS_BOOTBLOCK
> > //      flash_erase_block.c
> > //      flash_unlock_block.c
> > //              use this to erase or unlock the smaller 
> blocks at the
> > //              bottom of flash.  In the case of
> 
> 	also lock.c should have that but I only needed unlocking the
> bootblocks..
I am planning on reworking the boot/parameter block handling to be more
generic.  When I do that, I will rename this parameter to be something like
'CYGOPT_FLASH_NO_CFI', indicating that the default for the strata driver
would be to use CFI, but it is possible to override that default, if so
desired.  Of course my changes will be backwards compatible with the
existing bootblock code (provided that you change the #define).

> 
> > // CYGOPT_FLASH_IS_SYNCHRONOUS
> [...]
> > the K3 device supports individual block locking/unlocking.
> 
> The original strata the J3 does not hence the option. K3 is
> synchronous strata flash.
> 
Ahhh, the comment in the code said that one should define
'CYGOPT_FLASH_IS_SYNCHRONOUS' for the _K3_ part, hence my confusion.

In keeping with my NIH attitude :-) I am planning on renaming this option to
be 'CYGOPT_FLASH_UNLOCKS_ALL_BLOCKS', with a comment saying to define this
for devices, such as the J3 devices, that require it.

> > 
> > Also, a few other observations...
> > 1) The few datasheets I have looked at for the B3, K3, 
> etc... devices
> > all say that either 0x40 or 0x10 can be used to program a 
> single word
> > into the device.  So, conditioning 'FLASH_Program' to be 
> 0x40 vs 0x10
> > based on'CYGOPT_FLASH_IS_BOOTBLOCK' is a little confusing.
> 
> I thinks so too.
> 
OK, then.  Unless I hear protests otherwise, my patch will define
'FLASH_Program' to be 0x40 and 'Alt_FLASH_Program' to be 0x10 then.  There
doesn't appear to be any reason to switch between the two based upon whether
'CYGOPT_FLASH_IS_BOOTBLOCK' is defined or not.

> > 2) 'flash_program_buf()' writes the 'FLASH_Program' word to 'BA[0]'
> > rather than '*addr', which is what the datasheets I've seen 
> so far all
> > say to do.
> 
> You're right, I wonder why it worked for me...I had to write to BA[0]
> instead of ROM[0] though..Looks like a safe change.
> 
Yeah, the BA[0] vs. ROM[0] change would have been required to support RWW
and RWE capabilities.  Experimental evidence suggests that any address in
the partition will work for the first write, but for future compatibility, I
think I'll make the change.

> > the 28Fxxxx code).  All questions, comments, and words of
> > encouragement are welcome at this point.
> 
> go Patrick!
> 
Thanks :-)

--wpd


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