
Hi Everyone
I'm pretty new to U-Boot and Embedded system globally, but in the last few weeks I have learn a lot and I'm now trying to port correctly U-Boot v 1.3.4 to a custom board based on a Icecube. I'm able to boot a linux kernel with it when I use the RAM with the bootm command.
Unfortunately, I must make it work with the FLASH. The chip used for the flash is a S29GL128 or a S29GL256 from Spansion, they are 16bits chips but the bus is only 8bits. By reading the datasheet, these chips are supposed to support the Common Flash Interface so I'm trying to make then work with the CFI driver of U-Boot.
Here is what I get when booting with DEBUG activated:
U-Boot 1.3.4 (Oct 7 2008 - 16:39:49)
CPU: MPC5200B v2.2, Core v1.4 at 378 MHz Bus 84 MHz, IPB 84 MHz, PCI 21 MHz Board: Icecube Based Board I2C: 93 kHz, ready DRAM: 64 MB Top of RAM usable for U-Boot at: 04000000 Reserving 551k for U-Boot at: 03f76000 Reserving 130k for malloc() at: 03f55800 Reserving 68 Bytes for Board Info at: 03f557bc Reserving 60 Bytes for Global Data at: 03f55780 Stack Pointer at: 03f55768 New Stack Pointer is: 03f55768 Now running in RAM - U-Boot at: 03f76000 FLASH: flash detect cfi fwc addr ff000000 cmd f0 f0 8bit x 8 bit fwc addr ff000000 cmd f0 f0 8bit x 8 bit fwc addr ff000055 cmd 98 98 8bit x 8 bit is= cmd 51(Q) addr ff000010 is= 0 51 fwc addr ff000555 cmd 98 98 8bit x 8 bit is= cmd 51(Q) addr ff000010 is= 0 51 fwc addr ff000000 cmd f0 f0f0 16bit x 8 bit fwc addr ff000000 cmd f0 f0f0 16bit x 8 bit fwc addr ff0000aa cmd 98 9898 16bit x 8 bit is= cmd 51(Q) addr ff000020 is= 5151 5151 is= cmd 52(R) addr ff000022 is= 5252 5252 is= cmd 59(Y) addr ff000024 is= 5959 5959 device interface is 2 found port 2 chip 1 port 16 bits chip 8 bits 00 : 51 52 59 02 00 40 00 00 00 00 00 27 36 00 00 06 QRY..@.....'6... 10 : 06 09 13 03 05 03 02 19 02 00 06 00 01 ff 00 00 ................ 20 : 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 ............... fwc addr ff000000 cmd f0 f0f0 16bit x 8 bit fwc addr ff001554 cmd aa aaaa 16bit x 8 bit fwc addr ff000aaa cmd 55 5555 16bit x 8 bit fwc addr ff001554 cmd 90 9090 16bit x 8 bit fwc addr ff000000 cmd f0 f0f0 16bit x 8 bit fwc addr ff0000aa cmd 98 9898 16bit x 8 bit manufacturer is 2 manufacturer id is 0x5 device id is 0x56 device id2 is 0x0 cfi version is 0x3133 size_ratio 1 port 16 bits chip 8 bits found 1 erase regions erase region 0: 0x020000ff erase_region_count = 256 erase_region_size = 131072 ERROR: too many flash sectors fwc addr ff000000 cmd f0 f0 8bit x 8 bit flash_protect ON: from 0xFFF00000 to 0xFFF43FFF flash_protect ON: from 0xFFFE0000 to 0xFFFFFFFF 32 MB basetask = 0, tasks = 2 task_org = 0x03fb4c00 TDT start = 0x00000040, end = 0x000001b8 PCI: Bus Dev VenId DevId Class Int PCI Scan: Found Bus 0, Device 24, Function 0 00 18 168c 001b 0200 00 PCI Scan: Found Bus 0, Device 26, Function 0 00 1a 1057 5809 0680 00 In: serial Out: serial Err: serial U-Boot relocated to 03f76000 Net: mpc5xxx_fec_init_phy... Begin mpc5xxx_fec_init_phy... Done FEC ETHERNET
Type "boot" to boot to Linux (default) Type "help" for a list of commands
So I got an "ERROR: too many flash sectors" and a 32 MB size ... I know for sure that the chip is 16 MB so there is a kind of inconsistency... I'm also a bit confuse about what "#define" I should use to force my board to communicate in 8bit even if it's capable of 16bit. I though that I simply had to "#undef FLASH_CFI_16BIT" but that doesn't seem to do the trick.
I'm not sure to understand the debug output I got... fwc addr ff000000 cmd f0 f0 8bit x 8 bit ... fwc addr ff000000 cmd f0 f0f0 16bit x 8 bit
Also is the value of erase_region_count = 256 should be the number of sector on the chip ???? Because I know that the ship have a maximum of 128 sectors... If someone could brief me a bit about the debug output posted above I would greatly appreciate.
I'm pretty sure I have nearly complete the port except for this FLASH issue...
Help/Suggestion/Comments are welcome
Thank you
Sylvain