* [U-Boot-Users] STM flash support
@ 2007-06-12 0:40 Ganesh Ragavan
2007-06-12 5:33 ` Stefan Roese
2007-06-12 22:01 ` Tolunay Orkun
0 siblings, 2 replies; 5+ messages in thread
From: Ganesh Ragavan @ 2007-06-12 0:40 UTC (permalink / raw)
To: u-boot
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 ?
Thanks,
Ganesh*
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20070611/536048a7/attachment.htm
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] STM flash support
2007-06-12 0:40 [U-Boot-Users] STM flash support Ganesh Ragavan
@ 2007-06-12 5:33 ` Stefan Roese
2007-06-12 22:01 ` Tolunay Orkun
1 sibling, 0 replies; 5+ messages in thread
From: Stefan Roese @ 2007-06-12 5:33 UTC (permalink / raw)
To: u-boot
On Tuesday 12 June 2007, 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 ?
Looks like the FLASH mentioned above is CFI compatible (as most newer NOR
FLASH's are). So the common CFI FLASH driver should be able to deal with this
FLASH without any problems. No changes needed to the source code. Just use
the common CFi driver.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] STM flash support
2007-06-12 0:40 [U-Boot-Users] STM flash support Ganesh Ragavan
2007-06-12 5:33 ` Stefan Roese
@ 2007-06-12 22:01 ` Tolunay Orkun
2007-06-12 23:31 ` Ganesh Ragavan
1 sibling, 1 reply; 5+ messages in thread
From: Tolunay Orkun @ 2007-06-12 22:01 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] STM flash support
2007-06-12 22:01 ` Tolunay Orkun
@ 2007-06-12 23:31 ` Ganesh Ragavan
2007-06-13 5:02 ` Tolunay Orkun
0 siblings, 1 reply; 5+ messages in thread
From: Ganesh Ragavan @ 2007-06-12 23:31 UTC (permalink / raw)
To: u-boot
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@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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] STM flash support
2007-06-12 23:31 ` Ganesh Ragavan
@ 2007-06-13 5:02 ` Tolunay Orkun
0 siblings, 0 replies; 5+ messages in thread
From: Tolunay Orkun @ 2007-06-13 5:02 UTC (permalink / raw)
To: u-boot
First, never ever post HTML messages to the list. The mail format for
this list is plain text.
Ganesh Ragavan wrote:
> 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.
cfi_flash.c is in drivers directory. If you are not using cfi_flash.c
you are using a board custom flash driver.. There are/were a lot of
flash.c drivers in the past but many boards are now using cfi_flash
driver. You will have to support your own board custom driver yourself.
If your board is in public repository latest U-Boot version might be
already using cfi_flash driver.
Finally, U-Boot 1.0.0 is very old. There has been various bugs fixed.
You should use latest code from git repository.
Tolunay
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-06-13 5:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-12 0:40 [U-Boot-Users] STM flash support Ganesh Ragavan
2007-06-12 5:33 ` Stefan Roese
2007-06-12 22:01 ` Tolunay Orkun
2007-06-12 23:31 ` Ganesh Ragavan
2007-06-13 5:02 ` Tolunay Orkun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox