
Tolunay Orkun listmember@orkun.us wrote:
Sam,
There is not enough information from your email.
Tolunay, thanks. I added some info below. ......
Did you verify that you have correct data in environment after save? Try
I checked that and saw 'test=1' in new env parameters after reset.
Bank # 1: CFI conformant FLASH (16 x 16) Size: 8 MB in 128 Sectors Erase timeout 16384 ms, write timeout 0 ms, buffer write timeout 4096 ms, buffer size 32
Looks like your flash part does not support single word writes via conventional interface (write timeout is 0). It must use buffered writes. Did you enable buffer writes? You probably did but just double checking...
I didn't enable buffer writes. Once I defined CFG_FLASH_USE_BUFFER_WRITE, all save operations would encounter an error. Actually, I noticed it was unaccptable to enable buffer write for AMD flash.
MPC8548E_Rev1.1=> save Saving Environment to Flash... Un-Protected 1 sectors Erasing Flash... . done Erased 1 sectors Writing to Flash... Outside available Flash Protected 1 sectors MPC8548E_Rev1.1=>
Did you enable debug? What was the exact command you used to copy data to flash. Did you use cp.b or just
After enable debug in CFI, extra message obtained.
U-Boot 1.1.4 (Nov 19 2006 - 15:55:24), Build: [......] Now running in RAM - U-Boot at: 0ffe0000 FLASH: flash detect cfi fwc addr ff800000 cmd 0 0 8bit x 8 bit fwc addr ff800055 cmd 98 98 8bit x 8 bit is= cmd 51(Q) addr ff800010 is= 0 51 fwc addr ff800000 cmd 0 0000 16bit x 8 bit fwc addr ff8000aa cmd 98 9898 16bit x 8 bit is= cmd 51(Q) addr ff800020 is= 0051 5151 fwc addr ff800000 cmd 0 0000 16bit x 16 bit fwc addr ff8000aa cmd 98 0098 16bit x 16 bit is= cmd 51(Q) addr ff800020 is= 0051 0051 is= cmd 52(R) addr ff800022 is= 0052 0052 is= cmd 59(Y) addr ff800024 is= 0059 0059 ushort addr is at ff800050 info->portwidth = 2 addr[0] = 0x0 addr[1] = 0x2 addr[2] = 0x0 addr[3] = 0x0 retval = 0x2 device interface is 2 found port 2 chip 2 port 16 bits chip 16 bits ushort addr is at ff800026 info->portwidth = 2 addr[0] = 0x0 addr[1] = 0x2 addr[2] = 0x0 addr[3] = 0x0 retval = 0x2 ff800020 : 00 51 00 52 00 59 00 02 00 00 00 40 00 00 00 00 .Q.R.Y.....@.... ff800030 : 00 00 00 00 00 00 00 27 00 36 00 00 00 00 00 07 .......'.6...... ff800040 : 00 07 00 0a 00 00 00 01 00 05 00 04 00 00 00 17 ................ ff800050 : 00 02 00 00 00 05 00 00 00 01 00 7f 00 00 00 00 ................ ff800060 : 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ ff800070 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ ff800080 : 00 50 00 52 00 49 00 31 00 33 00 08 00 02 00 01 .P.R.I.1.3...... ff800090 : 00 01 00 04 00 00 00 00 00 01 00 b5 00 c5 00 04 ................ manufacturer is 2 size_ratio 1 port 16 bits chip 16 bits found 1 erase regions long addr is at ff80005a info->portwidth = 2 addr[0] = 0x0 addr[1] = 0x7f addr[2] = 0x0 addr[3] = 0x0 addr[4] = 0x0 addr[5] = 0x0 addr[6] = 0x0 addr[7] = 0x1 erase_region_count = 128 erase_region_size = 65536 ushort addr is at ff800054 info->portwidth = 2 addr[0] = 0x0 addr[1] = 0x5 addr[2] = 0x0 addr[3] = 0x0 retval = 0x5 fwc addr ff800000 cmd f0 00f0 16bit x 16 bit 8 MB L2 cache 512KB: enabled ...... MPC8548E_Rev1.1=> erase ffa00000 ffafffff ...... flash_is_busy: 0 .fwc addr ffaf0aaa cmd aa 00aa 16bit x 16 bit fwc addr ffaf0554 cmd 55 0055 16bit x 16 bit fwc addr ffaf0aaa cmd 80 0080 16bit x 16 bit fwc addr ffaf0aaa cmd aa 00aa 16bit x 16 bit fwc addr ffaf0554 cmd 55 0055 16bit x 16 bit fwc addr ffaf0000 cmd 30 0030 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 16 sectors MPC8548E_Rev1.1=> cp.b 1000000 ffa00000 40000 ...... flash_is_busy: 1 flash_is_busy: 0 fwc addr ff800aaa cmd aa 00aa 16bit x 16 bit fwc addr ff800554 cmd 55 0055 16bit x 16 bit fwc addr ff800aaa cmd a0 00a0 16bit x 16 bit flash_is_busy: 1 flash_is_busy: 0 fwc addr ff800aaa cmd aa 00aa 16bit x 16 bit fwc addr ff800554 cmd 55 0055 16bit x 16 bit fwc addr ff800aaa cmd a0 00a0 16bit x 16 bit ......
After 20 minutes or so, have to reset it to stop the debug loop...
MPC8548E_Rev1.1=> cmp 1000000 ffa00000 40000 word at 0x01023b3c (0x40a2ff74) != word at 0xffa23b3c (0x40a2ffff) Total of 36559 words were the same MPC8548E_Rev1.1=>
I once programmed a 128KB file sucessfully but never for 256KB or above.
What could be the problem be? I use the CFI driver from GIT repository on Nov. 2.
I recently submitted a patch for AMD style flashes but it addresses top boot flash geometry reversal. Your flash is uniform sectored. So, it is not necessary.
That's really a nice work. Some more boards flash driver in U-Boot tree can be switched to CFI Driver like RPXlite's, I think.
Thanks again,
Sam
___________________________________________________________ 抢注雅虎免费邮箱-3.5G容量,20M附件! http://cn.mail.yahoo.com