Hi All, At last all is done. There were plattform specific changes in the board.
Now I am able to run the CFI driver for flash chip S29GL512P. Thanks for your help so far. Regards, Prakash On Fri, Apr 16, 2010 at 8:08 PM, prakash bedge <prakash.be...@gmail.com>wrote: > Hi, > > > > I removed the changes as you suggested and now it is working without > modifying the code. > > Only thing is that I had to add a flag *CONFIG_SYS_WRITE_SWAPPED_DATA* and > it works. > > > > But here I am getting the error in erasing the sector as well in saveenv. > > > > U-Boot $ *saveenv* > > Saving Environment to Flash... > > copy old content: sect_addr: FFFA0000 env_addr: FFFA0000 offset: > 00000000 > > Protect off FFFA0000 ... FFFBFFFF > > Un-Protecting sectors 509..509 in bank 1 > > Un-Protected 1 sectors > > Erasing Flash...Erase Flash from 0xfffa0000 to 0xfffbffff in Bank # 1 > > fwc addr fffa0aaa cmd aa aa00 16bit x 16 bit > > fwc addr fffa0554 cmd 55 5500 16bit x 16 bit > > fwc addr fffa0aaa cmd 80 8000 16bit x 16 bit > > fwc addr fffa0aaa cmd aa aa00 16bit x 16 bit > > fwc addr fffa0554 cmd 55 5500 16bit x 16 bit > > fwc addr fffa0000 cmd 30 3000 16bit x 16 bit > > *flash_is_busy: 0* > > . done > > Erased 1 sectors > > *Writing to Flash... Flash not Erased* > > Protecting sectors 509..509 in bank 1 > > Protected 1 sectors > > > > Here the data is not erase but the last erase sector command data is > displayed instead of environment parameters. > > U-Boot $ md 0xfffa0000 > > fffa0000: 3000ffff ffffffff ffffffff ffffffff 0............... > > fffa0010: ffffffff ffffffff ffffffff ffffffff ................ > > > > I tired to program the word and erase the sector but here again erase > failed. > > U-Boot $ mw.w 0xfdfa0000 0xfc00 > > U-Boot $ mw.w 0xfdfa0aaa 0xaa00 > > U-Boot $ mw.w 0xfdfa0554 0x5500 > > U-Boot $ mw.w 0xfdfa0aaa 0xa000 > > U-Boot $ mw.w 0xfdfa0000 0x3132 > > U-Boot $ md.w 0xfdfa0000 > > fdfa0000: 3132 ffff ffff ffff ffff ffff ffff ffff 12.............. > > fdfa0010: ffff ffff ffff ffff ffff ffff ffff ffff ................ > > fdfa0020: ffff ffff ffff ffff ffff ffff ffff ffff ................ > > fdfa0030: ffff ffff ffff ffff ffff ffff ffff ffff ................ > > fdfa0040: ffff ffff ffff ffff ffff ffff ffff ffff ................ > > fdfa0050: ffff ffff ffff ffff ffff ffff ffff ffff ................ > > fdfa0060: ffff ffff ffff ffff ffff ffff ffff ffff ................ > > fdfa0070: ffff ffff ffff ffff ffff ffff ffff ffff ................ > > U-Boot $ erase 0xfdfa0000 +0x20000 > > Erase Flash from 0xfdfa0000 to 0xfdfbffff in Bank # 1 > > fwc addr fdfa0aaa cmd aa aa00 16bit x 16 bit > > fwc addr fdfa0554 cmd 55 5500 16bit x 16 bit > > fwc addr fdfa0aaa cmd 80 8000 16bit x 16 bit > > fwc addr fdfa0aaa cmd aa aa00 16bit x 16 bit > > fwc addr fdfa0554 cmd 55 5500 16bit x 16 bit > > fwc addr fdfa0000 cmd 30 3000 16bit x 16 bit > > flash_is_busy: 0 > > . done > > Erased 1 sectors > > U-Boot $ erase 0xfdfa0000 +0x20000 > > U-Boot $ md.w 0xfdfa0000 > > fdfa0000: *3000* ffff ffff ffff ffff ffff ffff ffff 0............... > > fdfa0010: ffff ffff ffff ffff ffff ffff ffff ffff ................ > > > But, when I program the 0xfcfa0000 address and tried to erase the sector > then I am able to erase the sector. > > > U-Boot $ mw.w 0xfcfa0000 0xfc00 > > U-Boot $ mw.w 0xfcfa0aaa 0xaa00 > > U-Boot $ mw.w 0xfcfa0554 0x5500 > > U-Boot $ mw.w 0xfcfa0aaa 0xa000 > > U-Boot *$ mw.w 0xfcfa0000 0x3132* > > U-Boot $ md.w 0xfcfa0000 > > fcfa0000: *3132* ffff ffff ffff ffff ffff ffff ffff 12.............. > > fcfa0010: ffff ffff ffff ffff ffff ffff ffff ffff ................ > > > > U-Boot $ *erase 0xfcfa0000 0x20000* > > Erase Flash from 0xfcfa0000 to 0xfcfbffff in Bank # 1 > > fwc addr fcfa0aaa cmd aa aa00 16bit x 16 bit > > fwc addr fcfa0554 cmd 55 5500 16bit x 16 bit > > fwc addr fcfa0aaa cmd 80 8000 16bit x 16 bit > > fwc addr fcfa0aaa cmd aa aa00 16bit x 16 bit > > fwc addr fcfa0554 cmd 55 5500 16bit x 16 bit > > fwc addr fcfa0000 cmd 30 3000 16bit x 16 bit > > flash_is_busy: 1 > > flash_is_busy: 1 > > flash_is_busy: 1 > > . > > . > > . > > flash_is_busy: 1 > > flash_is_busy: 1 > > flash_is_busy: 0 > > . done > > Erased 1 sectors > > U-Boot $ md 0xfcfa0000 > > *fcfa0000: ffffffff ffffffff* ffffffff ffffffff ................ > > fcfa0010: ffffffff ffffffff ffffffff ffffffff ................ > > fcfa0020: ffff ffff ffff ffff ffff ffff ffff ffff ................ > > fcfa0030: ffff ffff ffff ffff ffff ffff ffff ffff ................ > > > > I am able to erase 128 sector from flash base i.e. I am able to erase the > flash from flash base 0xfc000000 upto 16 MB size. > > But I am not able to erase the remaining 384 sectors from 0xFD000000 > onwards. > > > > My current flash settings > > /*----------------------------------------------------------------------- > > * FLASH related > > *----------------------------------------------------------------------*/ > > #define CONFIG_SYS_FLASH_CFI > > #define CONFIG_FLASH_CFI_DRIVER > > #define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for > empty sector on flinfo */ > > #define CONFIG_SYS_FLASH_BASE 0xfc000000 /* start > of FLASH */ > > #define CONFIG_ENV_IS_IN_FLASH 1 > > > > #define CONFIG_SYS_WRITE_SWAPPED_DATA > > > > #define CONFIG_SYS_FLASH_CFI_WIDTH (FLASH_CFI_16BIT) > > > > #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE} > > #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* > number of banks */ > > #define CONFIG_SYS_MAX_FLASH_SECT 512 /* > sectors per device */ > > #define CONFIG_FLASH_SHOW_PROGRESS 1 > > #define CONFIG_SYS_FLASH_ERASE_TOUT 300000 /* Timeout for Flash Erase > (in ms) */ > > #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash > Write (in ms) */ > > > > #define CONFIG_SYS_MONITOR_BASE 0xFFFC0000 /* Start of > U-Boot */ > > #define CONFIG_SYS_MONITOR_LEN 256 > > > > #define CONFIG_ENV_SECT_SIZE 0x20000 /* size of one complete > sector */ > > #define CONFIG_ENV_ADDR > (CONFIG_SYS_MONITOR_BASE-CONFIG_ENV_SECT_SIZE) > > #define CONFIG_ENV_SIZE 0x4000 /* Total > Size of Environment Sector */ > > > > > > But when I give the “erase all” command then the complete flash gets > erased. I am little bit confused by this abnormal behavior. > > Is there something in code needs to check or there be an issue with chip > address bus? > > > > Regards, > > Prakash > > > > > On Wed, Apr 14, 2010 at 5:35 PM, Stefan Roese <s...@denx.de> wrote: > >> Hi Prakash, >> >> On Wednesday 14 April 2010 07:03:59 prakash bedge wrote: >> > Does the latest code supports S29GL512P chip, since I am not seeing any >> > instance of this chip in 2010.03 uboot code. >> >> Yes. We have told you multiple times, that this chip is supported. You >> can't >> find it in the source though, since no code was needed to specifically >> support >> this chip. But its working! >> >> > >>So you have chipwidth *and* portwidth of 16! This is the most common >> use >> > >> > case. >> > But when flash is getting detected it shows the chipwidth is 8 and >> > portwidth is 16. If you see the logs in earlier mail it is like >> > *found port 2 chip 1 port 16 bits chip 8 bits. *Is it correct or wrong? >> > >> > >> Again, please use the mainline CFI driver and give it another try. >> > >> > I can not use the current code as we have to use the present code for >> some >> > reason. I believe the uboot code 2009.08, I am using, must also support >> the >> > S29GL512P chip. >> >> Yes. 2009.08 already supported this chip. But you seem to be using a >> special >> patch for this driver, which might afflict this. >> >> > I replaced the cfi_flash.c with the new cfi_flash.c file from latest >> uboot >> > version 2010.03 and done relevant changes. >> >> Which changes? No changes to this driver are needed to support this >> chip!!! >> >> > But still I didn't get the >> > postive result. Is there anything else that I have to check, or by using >> > only cfi_flash.c and cfi_flash.h from 2010.03 uboot code CFI flash >> driver >> > will work? >> > >> > I can not use the latest code but I want the CFI support for S29GL512P. >> > Can you please tell that, what I need to do to make the CFI driver works >> > for the S29GL512P chip? >> >> See above. >> >> > >> What kind of "utility"? Don't you use the BDI3000 for FLASH >> programming? >> > >> > We have customized utility to flash the binary. >> >> Still not clear to me, what this "utility" is. >> >> > Using BDI3000 I tried to >> > erase the flash but it didn't work. >> >> So the BDI FLASH commands ("erase", "prog" etc) don't work? >> >> > I followed the CFI erase command >> > seuence but it fails to erase the flash. >> > BDI3000>md 0xfe7c0000 >> > fe7c0000 : 27051956 552d426f 6f742032 3030392e '..VU-Boot 2009. >> > fe7c0010 : 30382028 41707220 31342032 30313020 08 (Apr 14 2010 >> > fe7c0020 : 2d203130 3a30313a 32392900 00000000 - 10:01:29)..... >> > fe7c0030 : 00000000 00000000 00000000 00000000 ................ >> > fe7c0040 : 00000000 00000000 00000000 00000000 ................ >> > fe7c0050 : 00000000 00000000 00000000 00000000 ................ >> > fe7c0060 : 00000000 00000000 00000000 00000000 ................ >> > fe7c0070 : 00000000 00000000 00000000 00000000 ................ >> > fe7c0080 : 00000000 00000000 00000000 00000000 ................ >> > fe7c0090 : 00000000 00000000 00000000 00000000 ................ >> > fe7c00a0 : 00000000 00000000 00000000 00000000 ................ >> > fe7c00b0 : 00000000 00000000 00000000 00000000 ................ >> > fe7c00c0 : 00000000 00000000 00000000 00000000 ................ >> > fe7c00d0 : 00000000 00000000 00000000 00000000 ................ >> > fe7c00e0 : 00000000 00000000 00000000 00000000 ................ >> > fe7c00f0 : 00000000 00000000 00000000 00000000 ................ >> > *BDI3000>mmb 0xfc000000 0xf0 >> > BDI3000>mmb 0xfc000aaa 0xaa >> > BDI3000>mmb 0xfc000555 0x55 >> > BDI3000>mmb 0xfc000aaa 0x80 >> > BDI3000>mmb 0xfc000aaa 0xaa >> > BDI3000>mmb 0xfc000555 0x55 >> > BDI3000>mmb 0xfe7c0000 0x30 >> > *BDI3000>mmb 0xfc000000 0xf0 >> > BDI3000>md 0xfe7c0000 -- *sector data is not erased >> >> You are using byte access. You should be using word (16bit) access >> instead! >> And the word unlock addresses. >> >> 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: off...@denx.de >> > >
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot