* [U-Boot] Query: Does Uboot support CFI flash driver for M29W128GH
[not found] <b9c1f3ac0910270208o212e2574x9892fc9b25399f19@mail.gmail.com>
@ 2009-10-27 9:09 ` prakash bedge
2009-10-27 10:21 ` [U-Boot] Query: Does Uboot support CFI flash driver forM29W128GH Sreedhar.a
0 siblings, 1 reply; 9+ messages in thread
From: prakash bedge @ 2009-10-27 9:09 UTC (permalink / raw)
To: u-boot
>
> Hi All,
>
> I am using a flash memory chip M29W128GH.
> As per datasheet this memory chip is CFI compliant and so I should use the
> common CFI flash driver for this chip.
>
> But I have seen some review comments on internet saying that UBoot have
> some error while resetting the M29W128GH flash chip.
> But in Uboot source code I am not seeing any instances of M29W128GH.
>
> Does UBoot support the flash driver for Flash memory chip M29W128GH?
> If yes then which flash driver I should use? Will it be from /common
> folder or specific board folder?
>
>
>
> Thanks & regards,
> Prakash Bedge
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] Query: Does Uboot support CFI flash driver forM29W128GH
2009-10-27 9:09 ` [U-Boot] Query: Does Uboot support CFI flash driver for M29W128GH prakash bedge
@ 2009-10-27 10:21 ` Sreedhar.a
2009-10-27 13:13 ` prakash bedge
0 siblings, 1 reply; 9+ messages in thread
From: Sreedhar.a @ 2009-10-27 10:21 UTC (permalink / raw)
To: u-boot
Hi Prakash,
There is a CFI flash driver as you have found it in drivers/.
The command set will be same for all the CFI complaint flash chips.
So the cfi_driver.c file will work for you.
-Sreedhar
-----Original Message-----
From: u-boot-bounces@lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On
Behalf Of prakash bedge
Sent: Tuesday, October 27, 2009 2:40 PM
To: u-boot at lists.denx.de
Subject: Re: [U-Boot] Query: Does Uboot support CFI flash driver
forM29W128GH
>
> Hi All,
>
> I am using a flash memory chip M29W128GH.
> As per datasheet this memory chip is CFI compliant and so I should use the
> common CFI flash driver for this chip.
>
> But I have seen some review comments on internet saying that UBoot have
> some error while resetting the M29W128GH flash chip.
> But in Uboot source code I am not seeing any instances of M29W128GH.
>
> Does UBoot support the flash driver for Flash memory chip M29W128GH?
> If yes then which flash driver I should use? Will it be from /common
> folder or specific board folder?
>
>
>
> Thanks & regards,
> Prakash Bedge
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] Query: Does Uboot support CFI flash driver forM29W128GH
2009-10-27 10:21 ` [U-Boot] Query: Does Uboot support CFI flash driver forM29W128GH Sreedhar.a
@ 2009-10-27 13:13 ` prakash bedge
2009-10-27 14:34 ` Stefan Roese
0 siblings, 1 reply; 9+ messages in thread
From: prakash bedge @ 2009-10-27 13:13 UTC (permalink / raw)
To: u-boot
Hi Sreedhar,
Are there some unknwon issues that I should take care of while using this
driver for M29W128GH?
M29W128GH is following AMD cmdset.
Do I need to add the structure for M29W128GH in jedec_flash.c or there is
some chip compatible to this chip is already present in Uboot and I only
have to use as it is.
Regards,
Prakash
On Tue, Oct 27, 2009 at 3:51 PM, Sreedhar.a
<sreedhar.a@jasmin-infotech.com>wrote:
>
> Hi Prakash,
>
> There is a CFI flash driver as you have found it in drivers/.
> The command set will be same for all the CFI complaint flash chips.
>
> So the cfi_driver.c file will work for you.
>
> -Sreedhar
>
> -----Original Message-----
> From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de]
> On
> Behalf Of prakash bedge
> Sent: Tuesday, October 27, 2009 2:40 PM
> To: u-boot at lists.denx.de
> Subject: Re: [U-Boot] Query: Does Uboot support CFI flash driver
> forM29W128GH
>
> >
> > Hi All,
> >
> > I am using a flash memory chip M29W128GH.
> > As per datasheet this memory chip is CFI compliant and so I should use
> the
> > common CFI flash driver for this chip.
> >
> > But I have seen some review comments on internet saying that UBoot have
> > some error while resetting the M29W128GH flash chip.
> > But in Uboot source code I am not seeing any instances of M29W128GH.
> >
> > Does UBoot support the flash driver for Flash memory chip M29W128GH?
> > If yes then which flash driver I should use? Will it be from /common
> > folder or specific board folder?
> >
> >
> >
> > Thanks & regards,
> > Prakash Bedge
> >
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] Query: Does Uboot support CFI flash driver forM29W128GH
2009-10-27 13:13 ` prakash bedge
@ 2009-10-27 14:34 ` Stefan Roese
2009-10-28 6:23 ` prakash bedge
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Roese @ 2009-10-27 14:34 UTC (permalink / raw)
To: u-boot
On Tuesday 27 October 2009 14:13:05 prakash bedge wrote:
> Are there some unknwon issues that I should take care of while using this
> driver for M29W128GH?
Searching the mailing list, you will notice one thread [Question about
M29W128G CFI QRY bug] which reports of a problem with the current version of
the common CFI driver and this chip. I just sent out a patch that should fix
this issue.
> M29W128GH is following AMD cmdset.
> Do I need to add the structure for M29W128GH in jedec_flash.c or there is
> some chip compatible to this chip is already present in Uboot and I only
> have to use as it is.
No, this chip should be CFI compatible. So you don't need to add any code to
jedec_flash.c. This is only for legacy JEDEC NOR chips.
Cheers,
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] 9+ messages in thread
* [U-Boot] Query: Does Uboot support CFI flash driver forM29W128GH
2009-10-27 14:34 ` Stefan Roese
@ 2009-10-28 6:23 ` prakash bedge
2009-10-28 8:08 ` Stefan Roese
0 siblings, 1 reply; 9+ messages in thread
From: prakash bedge @ 2009-10-28 6:23 UTC (permalink / raw)
To: u-boot
Hi Stefan,
Thanks. I have seen that patch work and I will try it and hope it will work
for M29W128GH (ST make).
But why I am not seeing the chip name and any instance of M29W128GH in Uboot
source code?
Is it because the chip is CFI compliant?
How I can crosscheck that present Uboot V2009.08 works for M29W128GH? Which
folder I should check for that?
I believe the Patch sent by you will work in this version.
Thanks & regards,
Prakash
On Tue, Oct 27, 2009 at 8:04 PM, Stefan Roese <sr@denx.de> wrote:
> On Tuesday 27 October 2009 14:13:05 prakash bedge wrote:
> > Are there some unknwon issues that I should take care of while using this
> > driver for M29W128GH?
>
> Searching the mailing list, you will notice one thread [Question about
> M29W128G CFI QRY bug] which reports of a problem with the current version
> of
> the common CFI driver and this chip. I just sent out a patch that should
> fix
> this issue.
>
> > M29W128GH is following AMD cmdset.
> > Do I need to add the structure for M29W128GH in jedec_flash.c or there
> is
> > some chip compatible to this chip is already present in Uboot and I only
> > have to use as it is.
>
> No, this chip should be CFI compatible. So you don't need to add any code
> to
> jedec_flash.c. This is only for legacy JEDEC NOR chips.
>
> Cheers,
> 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] 9+ messages in thread
* [U-Boot] Query: Does Uboot support CFI flash driver forM29W128GH
2009-10-28 6:23 ` prakash bedge
@ 2009-10-28 8:08 ` Stefan Roese
2009-10-29 6:24 ` prakash bedge
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Roese @ 2009-10-28 8:08 UTC (permalink / raw)
To: u-boot
Hi Prakash,
On Wednesday 28 October 2009 07:23:31 prakash bedge wrote:
> Thanks. I have seen that patch work and I will try it and hope it will work
> for M29W128GH (ST make).
>
> But why I am not seeing the chip name and any instance of M29W128GH in
> Uboot source code?
> Is it because the chip is CFI compliant?
Yes. For CFI compliant chips features like sector count, sector sizes etc are
autodetected. No need to define the chip with it's ID anywhere.
> How I can crosscheck that present Uboot V2009.08 works for M29W128GH? Which
> folder I should check for that?
> I believe the Patch sent by you will work in this version.
You should test it with the latest version of mainline U-Boot:
http://git.denx.de/?p=u-boot.git;a=summary
Please note that you need to add a board specific flash_cmd_reset() function
for this chip to work correctly. Something like this should work (untested):
void flash_cmd_reset(flash_info_t *info)
{
flash_write_cmd(info, 0, 0, AMD_CMD_RESET);
}
Cheers,
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] 9+ messages in thread
* [U-Boot] Query: Does Uboot support CFI flash driver forM29W128GH
2009-10-28 8:08 ` Stefan Roese
@ 2009-10-29 6:24 ` prakash bedge
2009-10-29 7:21 ` Stefan Roese
0 siblings, 1 reply; 9+ messages in thread
From: prakash bedge @ 2009-10-29 6:24 UTC (permalink / raw)
To: u-boot
Hi Stefan,
Thanks for information.
Can you please send me the patch details to fixup the CFI query related bug
for M29W128GH?
In the code for each header file there is a macro named
CONFIG_FLASH_CFI_DRIVER defined in each board specific header file in folder
/include/configs. But I am not seeing any #ifdef for this macro in code.
Where this macro is being checked in the code?
Is there any documentation giving details on how the CFI flash
driver executes in U-Boot?
Please share the document if you have.
Thanks & Regards,
Prakash
On Wed, Oct 28, 2009 at 1:38 PM, Stefan Roese <sr@denx.de> wrote:
> Hi Prakash,
>
> On Wednesday 28 October 2009 07:23:31 prakash bedge wrote:
> > Thanks. I have seen that patch work and I will try it and hope it will
> work
> > for M29W128GH (ST make).
> >
> > But why I am not seeing the chip name and any instance of M29W128GH in
> > Uboot source code?
> > Is it because the chip is CFI compliant?
>
> Yes. For CFI compliant chips features like sector count, sector sizes etc
> are
> autodetected. No need to define the chip with it's ID anywhere.
>
> > How I can crosscheck that present Uboot V2009.08 works for M29W128GH?
> Which
> > folder I should check for that?
> > I believe the Patch sent by you will work in this version.
>
> You should test it with the latest version of mainline U-Boot:
>
> http://git.denx.de/?p=u-boot.git;a=summary
>
> Please note that you need to add a board specific flash_cmd_reset()
> function
> for this chip to work correctly. Something like this should work
> (untested):
>
> void flash_cmd_reset(flash_info_t *info)
> {
> flash_write_cmd(info, 0, 0, AMD_CMD_RESET);
> }
>
> Cheers,
> 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] 9+ messages in thread
* [U-Boot] Query: Does Uboot support CFI flash driver forM29W128GH
2009-10-29 6:24 ` prakash bedge
@ 2009-10-29 7:21 ` Stefan Roese
2009-10-29 10:19 ` prakash bedge
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Roese @ 2009-10-29 7:21 UTC (permalink / raw)
To: u-boot
Hi Prakash,
On Thursday 29 October 2009 07:24:25 prakash bedge wrote:
> Can you please send me the patch details to fixup the CFI query related bug
> for M29W128GH?
I did send you the patch in my last mail. You just need to add this code to a
board specific file, e.g. board/board_name/board_name.c.
> In the code for each header file there is a macro named
> CONFIG_FLASH_CFI_DRIVER defined in each board specific header file in
> folder /include/configs. But I am not seeing any #ifdef for this macro in
> code. Where this macro is being checked in the code?
It's in the makefile (drivers/mdt/Makefile).
> Is there any documentation giving details on how the CFI flash
> driver executes in U-Boot?
It's really simple, just copy the config options and change some
values like CONFIG_SYS_FLASH_BANKS_LIST, CONFIG_SYS_MAX_FLASH_BANKS
according to your hardware specs. Take a look at zeus for example:
#define CONFIG_SYS_FLASH_CFI /* The flash is CFI compatible */
#define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver */
#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
#define CONFIG_SYS_MAX_FLASH_SECT 512 /* max number of sectors on one chip */
#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */
#define CONFIG_SYS_FLASH_PROTECTION 1 /* use hardware flash protection */
#define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */
#define CONFIG_SYS_FLASH_QUIET_TEST 1 /* don't warn upon unknown flash */
This shouldn't be too hard.
Cheers,
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] 9+ messages in thread
* [U-Boot] Query: Does Uboot support CFI flash driver forM29W128GH
2009-10-29 7:21 ` Stefan Roese
@ 2009-10-29 10:19 ` prakash bedge
0 siblings, 0 replies; 9+ messages in thread
From: prakash bedge @ 2009-10-29 10:19 UTC (permalink / raw)
To: u-boot
Hi Stefan,
I have did the same.
Thanks for all infomation given so far.
Regards,
Prakash
On Thu, Oct 29, 2009 at 12:51 PM, Stefan Roese <sr@denx.de> wrote:
> Hi Prakash,
>
> On Thursday 29 October 2009 07:24:25 prakash bedge wrote:
> > Can you please send me the patch details to fixup the CFI query related
> bug
> > for M29W128GH?
>
> I did send you the patch in my last mail. You just need to add this code to
> a
> board specific file, e.g. board/board_name/board_name.c.
>
> > In the code for each header file there is a macro named
> > CONFIG_FLASH_CFI_DRIVER defined in each board specific header file in
> > folder /include/configs. But I am not seeing any #ifdef for this macro
> in
> > code. Where this macro is being checked in the code?
>
> It's in the makefile (drivers/mdt/Makefile).
>
> > Is there any documentation giving details on how the CFI flash
> > driver executes in U-Boot?
>
> It's really simple, just copy the config options and change some
> values like CONFIG_SYS_FLASH_BANKS_LIST, CONFIG_SYS_MAX_FLASH_BANKS
> according to your hardware specs. Take a look at zeus for example:
>
> #define CONFIG_SYS_FLASH_CFI /* The flash is CFI
> compatible */
> #define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver
> */
>
> #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
>
> #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory
> banks */
> #define CONFIG_SYS_MAX_FLASH_SECT 512 /* max number of sectors on
> one chip */
>
> #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase
> (in ms) */
> #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write
> (in ms) */
>
> #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x
> faster) */
> #define CONFIG_SYS_FLASH_PROTECTION 1 /* use hardware flash
> protection */
>
> #define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty
> sector on flinfo */
> #define CONFIG_SYS_FLASH_QUIET_TEST 1 /* don't warn upon unknown
> flash */
>
> This shouldn't be too hard.
>
> Cheers,
> 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] 9+ messages in thread
end of thread, other threads:[~2009-10-29 10:19 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <b9c1f3ac0910270208o212e2574x9892fc9b25399f19@mail.gmail.com>
2009-10-27 9:09 ` [U-Boot] Query: Does Uboot support CFI flash driver for M29W128GH prakash bedge
2009-10-27 10:21 ` [U-Boot] Query: Does Uboot support CFI flash driver forM29W128GH Sreedhar.a
2009-10-27 13:13 ` prakash bedge
2009-10-27 14:34 ` Stefan Roese
2009-10-28 6:23 ` prakash bedge
2009-10-28 8:08 ` Stefan Roese
2009-10-29 6:24 ` prakash bedge
2009-10-29 7:21 ` Stefan Roese
2009-10-29 10:19 ` prakash bedge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox