[U-Boot-Users] STM flash support

Ganesh Ragavan ganeshragavan at gmail.com
Wed Jun 13 01:31:26 CEST 2007


Thanks Stefan and Tolunay for the response.  The U-Boot version we are using
is 1.0.0, which does not have the file cfi_flash.c that you mentioned.  We
don't want to upgrade the version.  To explain the problem in more detail:


We have the following code segment in  *flash_get_size* method of *flash.c*file.


*case (FLASH_WORD_SIZE)AMD_ID_MIRROR:
     value2 = addr2[0x0e];
     value3 = addr2[0x0f];
#ifdef DEBUG
  printf ("flash value2 = 0x%x\n",value2);
  printf ("flash value3 = 0x%x\n",value3);
#endif
  if (value2 == (FLASH_WORD_SIZE)AMD_ID_LV128U_2
  &&  value3 == (FLASH_WORD_SIZE)AMD_ID_LV128U_3)
  {
   info->flash_id += FLASH_AMLV128U;
   info->sector_count = 256;
   info->size = 0x01000000;
  }
  else  {
   info->flash_id = FLASH_UNKNOWN;
   return (0);   /* => no or unknown flash */
  }
  break;*



This was the code segmented that got executed with our old AMD flash.  The
new ST flash has a different value for value3 parameter above.  As a result
I need to add another if condition something like below:

*  if (value2 == (FLASH_WORD_SIZE)AMD_ID_LV128U_2
  &&  value3 == (FLASH_WORD_SIZE)ST_ID_..........._3)
  {
   info->flash_id += XXXXXXXXX;
   info->sector_count = 256;
   info->size = 0x01000000;
  }*


I was wondering what the value of *XXXXXXXXX** *should be?

Thanks,
Ganesh






On 6/12/07, Tolunay Orkun <listmember at orkun.us> wrote:
>
> Ganesh Ragavan wrote:
> >
> > We recently moved to STM flash memory for one of our boards.  The
> > flash we are using is M29W128FH.  I don't see any support for this
> > flash in the ~/include/flash.h file in the U-boot source tree.  Could
> > someone please let me know how I could add support for this flash in
> > U-boot ?
> >
> Please try cfi_flash.c driver. Your flash is a CFI flash (AFAIK) and
> does not need a #define macro when using cfi_flash.c driver.
>
> Tolunay
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20070612/5bbf4001/attachment.htm 


More information about the U-Boot mailing list