[U-Boot-Users] RE: CFI conformant flash driver available

It helps if I attach the patch.
To enable the driver CFG_CFI_FLASH_DRIVER must be defined.
Attached is a patch for the cfi flash driver. The driver includes support for both the Intel and the AMD command sets.
The tar file contains 2 files, a patch for the existing sources and the cfi_flash.c which must be placed in the drivers directory. Thanks to all who are helping out. Please let me know if there are any problems or if things went well. If possible plese let me know what are the port width, chip width, flash chip and number of banks on successful uses of this driver. Wolfgang - please do not apply this until I get some feedback from those who are testing it. Thanks Brad Kemp

Brad Kemp you worte:
Thanks to all who are helping out. Please let me know if there are any problems or if things went well. If possible plese let me know what are the
port
width, chip width, flash chip and number of banks on successful uses of this driver.
Thanks,I got it and plan to test it on LITW_DW first with 4 AM29DL323DB90VI[TOTAL 16Byte] in 4*8bit mode.As for INTEL flash,I am afriad of delaying some time for u-boot haven't booted successfully on my custom board with 4 E28F128J3A in 4*8bit mode.
Best regards,
Sam
_________________________________________________________ Do You Yahoo!? 繁华世界里,让我看清你 http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_prof...

Brad,
I will test your new driver with my 2x 28F128AJ3 (2 x 16 = 32bit bus). I think I also got the older strataflash.c working on my Cogent CSB272 board last week. However, I added a couple of lines to support what my older driver was doing:
1) In flash_init(), I added flash_protect() calls to protect the monitor and environment sectors (the latter if ENV_IN_FLASH is set).
2) In flash_real_protect(), I added a couple of lines at the very beginning of the function to retrieve the current sector protection status from the flash and avoid resetting the protection if it has not changed. I did this because I did not want extra wear on the flash due to unnecessary flash_protect() calls done in #1.
I am on a different computer right now but it was something like:
if (flash_isset(info, sector, FLASH_OFFSET_PROTECT, FLASH_STATUS_PROTECT) == prot) return 0;
If you want I send send you the stataflash.c & the patch for you to review.
I have a question as well. The CFI driver is identifying the buffer in one chip and using that for buffered writes. For example, for Intel Strataflash 28F128AJ3 the buffer is 32 bytes. However, when I use 2 of these chips side by side (interleaved) shouldn't the buffer used be x2 (i.e. 64 bytes) as well. I think we are not fully taking advantage of total buffer available for buffered writes... For 4x8 (4 chips in 8 bit mode each) the total buffer would be 128 bytes.
Best regards. Tolunay
It helps if I attach the patch.
To enable the driver CFG_CFI_FLASH_DRIVER must be defined.
Attached is a patch for the cfi flash driver. The driver includes support for both the Intel and the AMD command sets.
The tar file contains 2 files, a patch for the existing sources and the cfi_flash.c which must be placed in the drivers directory. Thanks to all who are helping out. Please let me know if there are any problems or if things went well. If possible plese let me know what are the port width, chip width, flash chip and number of banks on successful uses of this driver. Wolfgang - please do not apply this until I get some feedback from those who are testing it. Thanks Brad Kemp

Dear Brad,
in message CFE1C3BDE1264C4D9E569E89B3AF8FA86C524D@grubber.seranoa.com you wrote:
To enable the driver CFG_CFI_FLASH_DRIVER must be defined.
Attached is a patch for the cfi flash driver. The driver includes support for both the Intel and the AMD command sets.
Thanks, added.
Best regards,
Wolfgang Denk

Dear Mr. Wolfgang and Brad,
Wolfgang wrote:
To enable the driver CFG_CFI_FLASH_DRIVER must be defined. Attached is a patch for the cfi flash driver. The driver includes support for both the Intel and the AMD command sets.
Thanks, added.
Best regards,
Wolfgang Denk
Do you really want to release the patch on u-boot?There are still on the way to test it on two or more devices.At least,it didn't work in 4x8bit mode on LITE_DW.
Brad,do you want to give up testing the patch on more than one device?
Best regards,
Sam
_________________________________________________________ Do You Yahoo!? 完全免费的雅虎电邮,马上注册获赠额外60兆网络存储空间 http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.mail.yahoo.com

Dear Sam,
in message 20040209022249.66473.qmail@web15214.mail.bjs.yahoo.com you wrote:
Do you really want to release the patch on
It's not "released", just added to the top-of-tree version of the CVS.
u-boot?There are still on the way to test it on two or more devices.At least,it didn't work in 4x8bit mode on LITE_DW.
Having the patch checked in on the CVS server gives us all a common base to submit any further corrections or updates.
I'm looking forward to seeing your fixes.
Best regards,
Wolfgang Denk

Wolfgang Denk wrote:
It's not "released", just added to the top-of-tree version of the CVS.
Sorry and Fine!I misunderstood CVS nature.
Having the patch checked in on the CVS server gives us all a common base to submit any further corrections or updates.
I'm looking forward to seeing your fixes.
As far as I can fix for cfi_flash.c,just two numbers and one program style.See my first patch as following.
Best regards,
Sam
--- drivers/cfi_flash.c Mon Feb 9 18:28:48 2004 +++ drivers/cfi_flash.c Tue Feb 10 19:49:34 2004 @@ -36,12 +36,12 @@ * * Tested Architectures * Port Width Chip Width # of banks Flash Chip Board - * 32 16 1 23F128J3 seranoa/eagle - * 64 16 1 23F128J3 seranoa/falcon + * 32 16 1 28F128J3 seranoa/eagle + * 64 16 1 28F128J3 seranoa/falcon */
/* The DEBUG define must be before common to enable debugging */ -//#define DEBUG 1 +/* #define DEBUG 1 */ #include <common.h> #include <asm/processor.h> #ifdef CFG_FLASH_CFI_DRIVER
_________________________________________________________ Do You Yahoo!? 完全免费的雅虎电邮,马上注册获赠额外60兆网络存储空间 http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.mail.yahoo.com

In message 20040210122426.68208.qmail@web15205.mail.bjs.yahoo.com you wrote:
As far as I can fix for cfi_flash.c,just two numbers and one program style.See my first patch as following.
Added. Thanks.
Best regards,
Wolfgang Denk
participants (4)
-
Brad Kemp
-
listmember@orkun.us
-
Sam Song
-
Wolfgang Denk