Re: [U-Boot-Users] [PATCH] ARM Versatile PB926EJ-S, Rev.D: Added support for flash 28F256L30B

From: Stefan Roese [mailto:sr@denx.de] Sent: Friday, May 25, 2007 8:03 AM To: u-boot-users@lists.sourceforge.net Cc: Josef Meser; Peter Pearse Subject: Re: [U-Boot-Users] [PATCH] ARM Versatile PB926EJ-S, Rev.D: Added support for flash 28F256L30B
Hi Josef,
On Friday 25 May 2007, Josef Meser wrote:
Current u-boot works with ARM Versatile PB926EJ-S, HW- Rev.C (NOR flash 28F256K3). This patch adds support for 28F256L30B (asymmetrical sectors: 4 small sectors at bottom) used on HW-Rev.D.
Your patch is line wrapped. Please fix and resend.
Hi Stefan,
sorry about that. Yesterday I sent the patch to myself and it was not line wrapped. Now I learned that this is a feature of our famous M$-MUA, which does line wraps in plain text messages, when sending to "Internet addresses". I will fix this by using a real MUA.
One question: Why can't you use the common CFI driver on this board?
I have to admit that I am not familiar with the CFI driver. I made the patch for u-boot-1.1.5 which we used up to now. There it makes a
[]> make versatile_config []> make all
work on the new HW. Rev.D.
As i did not find the new type of flash in the current source tree, I submitted my changes. This changes are minimal (in terms of size and function) for me, which does not mean that they are optimal for someone who is more into u-boot.
Regards, Josef

On Friday 25 May 2007, Josef Meser wrote:
One question: Why can't you use the common CFI driver on this board?
I have to admit that I am not familiar with the CFI driver. I made the patch for u-boot-1.1.5 which we used up to now. There it makes a
[]> make versatile_config []> make all
work on the new HW. Rev.D.
As i did not find the new type of flash in the current source tree, I submitted my changes. This changes are minimal (in terms of size and function) for me, which does not mean that they are optimal for someone who is more into u-boot.
The common CFI flash driver (drivers/cfi_flash.c) is designed to function with all CFI compatible flash's. The new flash you added is a CFI compatible flash. The question remains, what are the "old" flash's used on the board before? Do you have an old board to test the CFI driver on both board revisions?
Integrating the CFI driver is quite easy: You have to change your board config file to something like this:
/*----------------------------------------------------------------------- * FLASH related *----------------------------------------------------------------------*/ #define CFG_FLASH_CFI /* The flash is CFI compatible */ #define CFG_FLASH_CFI_DRIVER /* Use common CFI driver */
#define CFG_FLASH_BANKS_LIST {CFG_FLASH_BASE} #define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ #define CFG_MAX_FLASH_SECT 512 /* max number of sectors on one chip */
#define CFG_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ #define CFG_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
#define CFG_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */ #define CFG_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */
This has to be adjusted of course, if you need to support more than one flash chip (two or more banks).
And you need to disable the board specific flash driver completely from your board Makefile.
Please give it a try and let me know if your have any further questions.
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@denx.de =====================================================================

I have a patch in the pipeline such that all ARM supplied development boards will use CFI flash.
Peter
-----Original Message----- From: Stefan Roese [mailto:sr@denx.de] Sent: 25 May 2007 08:29 To: u-boot-users@lists.sourceforge.net Cc: Josef Meser; Peter Pearse Subject: Re: [U-Boot-Users] [PATCH] ARM Versatile PB926EJ-S, Rev.D: Added support for flash 28F256L30B
On Friday 25 May 2007, Josef Meser wrote:
One question: Why can't you use the common CFI driver on
this board?
I have to admit that I am not familiar with the CFI driver.
I made the
patch for u-boot-1.1.5 which we used up to now. There it makes a
[]> make versatile_config []> make all
work on the new HW. Rev.D.
As i did not find the new type of flash in the current
source tree, I
submitted my changes. This changes are minimal (in terms of
size and
function) for me, which does not mean that they are optimal for someone who is more into u-boot.
The common CFI flash driver (drivers/cfi_flash.c) is designed to function with all CFI compatible flash's. The new flash you added is a CFI compatible flash. The question remains, what are the "old" flash's used on the board before? Do you have an old board to test the CFI driver on both board revisions?
Integrating the CFI driver is quite easy: You have to change your board config file to something like this:
/*------------------------------------------------------------
- FLASH related
*------------------------------------------------------------- ---------*/ #define CFG_FLASH_CFI /* The flash is CFI compatible */ #define CFG_FLASH_CFI_DRIVER /* Use common CFI driver */
#define CFG_FLASH_BANKS_LIST {CFG_FLASH_BASE} #define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ #define CFG_MAX_FLASH_SECT 512 /* max number of sectors on one chip */
#define CFG_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ #define CFG_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
#define CFG_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */ #define CFG_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */
This has to be adjusted of course, if you need to support more than one flash chip (two or more banks).
And you need to disable the board specific flash driver completely from your board Makefile.
Please give it a try and let me know if your have any further questions.
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@denx.de =====================================================================
participants (3)
-
Josef Meser
-
Peter Pearse
-
Stefan Roese