Skip to contentSkip to conversation

u-boot CFI driver question

U-Boot-Users shafer 2 participants 2 messages Oct 24, 2007 – Oct 25, 2007

lore
Share & tools
lore

shafer

author
#0 lore raw

I am attempting to bring up a board with u-boot. I've so far been able to get u-boot far enough along to get to the main prompt. I am having an issue reading from and writing to the FLASH memory in my setup. For simplicity sake my setup consists of an ARM920T processor, EEPROM (AM29040B) and 2 FLASH devices (S29GL256N...). U-boot resides in the EEPROM and I am able to read/write to the EEPROM.

My non-EEPROM FLASH configuration consists of two devices. Both devices have 23 address pins and 16 data pins. I have routed the 23 address pins of the ARM to both FLASH devices. However, I have routed the ARM?s lower 16 data pins to one device and its upper 16 data pins to the second device. On paper this should give me 8 Meg locations of 32 bits for a total of 32 Megs of FLASH.

I have compiled u-boot to include the CFI driver. I am pretty certain that I have setup the ARM through u-boot to use the proper chip select and address/data bus. I believe this because when I issue an erase command from the u-boot prompt I can see the correct chip select toggle and I see the correct address and data pins wiggling.

My issue seems to be when I try to read/write to the FLAHS devices. For example, when I issue the erase command u-boot spits back an error message. Unfortunately, I am not able to tell you the exact error message at the moment and I cannot remember the exact phrase.

Error message aside I suspect that I am have a problem because I have not informed u-boot of this configuration. So my questions are:

1) Does u-boot inherently support a setup with a 32 bit data bus split across two devices?
2) If so can someone point me to an example configuration file in u-boot to get the cfi driver properly configured?
3) If not, has someone patched u-boot to handle this configuration?

Thanks for the help in advance.

Signature · 2 lines
View this message in context: http://www.nabble.com/u-boot-CFI-driver-question-tf4686656.html#a13393794
Sent from the Uboot - Users mailing list archive at Nabble.com.
#1 lore raw

Hi,

u-boot-users-bounces at lists.sourceforge.net wrote on Wednesday, October 24, 2007 9:58 PM:

Quoted 12 lines

I am attempting to bring up a board with u-boot. I've so far been able to get
u-boot far enough along to get to the main prompt. I am having an issue
reading from and writing to the FLASH memory in my setup. For simplicity
sake my setup consists of an ARM920T processor, EEPROM (AM29040B) and 2
FLASH devices (S29GL256N...). U-boot resides in the EEPROM and I am able to
read/write to the EEPROM.

Quoted 4 lines

My non-EEPROM FLASH configuration consists of two devices. Both devices have 23 address pins and 16 data pins. I have routed the 23 address pins of the
ARM to both FLASH devices. However, I have routed the ARM?s lower 16

Since you have a 32 bit data bus, you didn't connect the address lines A0 and A1 to your flash, did you (you mentioned you've connected all 23 address lines, which would propably be wrong)?

Quoted 6 lines

data
pins to one device and its upper 16 data pins to the second device. On paper
this should give me 8 Meg locations of 32 bits for a total of 32 Megs of
FLASH.

The S29GL256N is a 256 MBit type. So you get 16M x 16 Bit x 2 (Chips) = 64 MByte Flash. If your cpu only has address lines A0 to A23, this is maybe too less to access 64 MByte of Flash (it depends, on how you could configure your bus interface). Normally you need the address lines A0 to A25 and connect A2 to A25 to your Flash:
A2 (cpu) -> A0 (flash), A3 -> A1, ...

Quoted 9 lines

I have compiled u-boot to include the CFI driver. I am pretty certain that I
have setup the ARM through u-boot to use the proper chip select and address/data bus. I believe this because when I issue an erase command from
the u-boot prompt I can see the correct chip select toggle and I see the
correct address and data pins wiggling.

Quoted 6 lines

My issue seems to be when I try to read/write to the FLAHS devices. For
example, when I issue the erase command u-boot spits back an error message. Unfortunately, I am not able to tell you the exact error message at the
moment and I cannot remember the exact phrase.

Hm, you should be possible to reproduce the error messag by simply issuing the erase command again on the u-boot prompt, no?

Quoted 6 lines

Error message aside I suspect that I am have a problem because I have not
informed u-boot of this configuration. So my questions are:

1) Does u-boot inherently support a setup with a 32 bit data bus split across two devices?

Yes. If your hardware is configured correctliy, it should be transparent to U-Boot.

Quoted 3 lines

2) If so can someone point me to an example configuration file in u-boot to
get the cfi driver properly configured?

The cfi driver dont't need to be configured. It should be able to detect your flash memory.

Quoted 1 line

3) If not, has someone patched u-boot to handle this configuration?

This is a very common board configuration (the TQM5200 board uses this configuration for example).

Best Regards,
Martin Krause

--
TQ-Systems GmbH
Muehlstrasse 2, Gut Delling, D-82229 Seefeld
Amtsgericht Muenchen, HRB 105 018, UST-IdNr. DE 811 607 913
Geschaeftsfuehrer: Dipl.-Ing. (FH) Detlef Schneider, Dipl.-Ing. (FH) Ruediger Stahl
http://www.tq-group.com