On 11/12/2011 5:31 PM, Gudjon I. Gudjonsson wrote: > Hi list Hi Gudjon,
> I have replaced the at49bv642d nor flash memory on my Atmel ngw100 board > with the pin compatible m28w640hcb flash memory from Micron (formerly > Numonyx). > > I can program the U-boot to the flash without problems using a JTAG. I > can > also program the full buildroot Linux system using JTAG and verify the bytes > using the md.b command in U-boot. Therefore I assume there is nothing wrong > with my hardware. However, I can neither make U-boot nor Linux write to the > flash and Linux doesn't boot from the flash. > I did start the Linux system from an NFS root and could detect the memory > as a read only device in Linux but the /dev/mtdblockX devices did not appear. > I have spent a lot of time on the problem without success and I am > wondering how to proceed. Hopefully someone spots the problem directly. I have had a similar problem with spear3xx board. Basically, this flash is write protected in hardware by default. It has to be specifically made writable. Please define a flag CONFIG_SYS_FLASH_PROTECTION in your config file. > The spear3xx series boards include the m28w640hct device. I could buy > such > a board to test but is anyone using that board with U-boot? If so can you > please confirm that U-boot can write to the flash? I am the maintainer of this baord in u-boot and it works with version u-boot-2010.03 > Another idea is to replace the at64bv642 chip with some other NOR-flash, > has anyone done that with success? > > The u-boot debug output can be found below. There are some (null) > addresses that don't appear when using the working at49bv642d flash > Please try it and let me know if it helps Regards Vipin > Thanks a lot for any help > Gudjon > > > /****************************** > U-boot startup > *******************************/ > U-Boot 2010.06 (Nov 12 2011 - 11:48:36) > > U-Boot code: (null) -> 00011ae0 data: 00018e38 -> 0004e7b8 > VMR table @ 0x11fca684 > DMA: Using memory from 0x11f6d000 to 0x11f71000 > flash detect cfi > fwc addr (null) cmd f0 f0 8bit x 8 bit > fwc addr (null) cmd ff ff 8bit x 8 bit > fwc addr 00000055 cmd 98 98 8bit x 8 bit > is= cmd 51(Q) addr 00000010 is= ff 51 > fwc addr 00000555 cmd 98 98 8bit x 8 bit > is= cmd 51(Q) addr 00000010 is= ff 51 > fwc addr (null) cmd f0 f0f0 16bit x 8 bit > fwc addr (null) cmd ff ffff 16bit x 8 bit > fwc addr 000000aa cmd 98 9898 16bit x 8 bit > is= cmd 51(Q) addr 00000020 is= 0051 5151 > fwc addr 00000aaa cmd 98 9898 16bit x 8 bit > is= cmd 51(Q) addr 00000020 is= 0051 5151 > fwc addr (null) cmd f0 00f0 16bit x 16 bit > fwc addr (null) cmd ff 00ff 16bit x 16 bit > fwc addr 000000aa cmd 98 0098 16bit x 16 bit > is= cmd 51(Q) addr 00000020 is= 0051 0051 > is= cmd 52(R) addr 00000022 is= 0052 0052 > is= cmd 59(Y) addr 00000024 is= 0059 0059 > device interface is 1 > found port 2 chip 2 port 16 bits chip 16 bits > 00 : 51 52 59 03 00 35 00 00 00 00 00 27 36 b4 c6 04 QRY..5.....'6... > 10 : 04 0a 00 05 05 03 00 17 01 00 03 00 02 07 00 20 ............... > 20 : 00 7e 00 00 01 50 52 49 31 30 e6 00 00 11 fb 4e .~...PRI10.....N > fwc addr (null) cmd ff 00ff 16bit x 16 bit > fwc addr (null) cmd 90 0090 16bit x 16 bit > fwc addr (null) cmd ff 00ff 16bit x 16 bit > fwc addr 000000aa cmd 98 0098 16bit x 16 bit > manufacturer is 3 > manufacturer id is 0x20 > device id is 0x49 > device id2 is 0x0 > cfi version is 0x3130 > size_ratio 1 port 16 bits chip 16 bits > found 2 erase regions > erase region 0: 0x00200007 > erase_region_count = 8 erase_region_size = 8192 > erase region 1: 0x0100007e > erase_region_count = 127 erase_region_size = 65536 > fwc addr (null) cmd ff 00ff 16bit x 16 bit > flash_protect ON: from 0x00000000 to 0x0001AC37 > protect on 0 > protect on 1 > protect on 2 > protect on 3 > protect on 4 > protect on 5 > protect on 6 > protect on 7 > protect on 8 > flash_protect ON: from 0x007F0000 to 0x007FFFFF > protect on 134 > Flash: 8 MiB at address 0x00000000 > DRAM Configuration: > Bank #0: 10000000 32 MiB > *** Warning - bad CRC, using default environment > > In: serial > Out: serial > Err: serial > Net: macb0, macb1 > Press SPACE to abort autoboot in 1 seconds > ### JFFS2 loading 'uImage' to 0x10400000 > Scanning JFFS2 FS: done. > > find_inode failed for name=uImage > > load: Failed to find inode > > ### JFFS2 LOAD ERROR<0> for uImage! > Wrong Image Format for bootm command > ERROR: can't get kernel image! > > /****************************** > Flash info > *******************************/ > > U-Boot> fli > > > Bank # 1: CFI conformant FLASH (16 x 16) Size: 8 MB in 135 Sectors > Intel Standard command set, Manufacturer ID: 0x20, Device ID: 0x49 > Erase timeout: 8192 ms, write timeout: 1 ms > Buffer write timeout: 1 ms, buffer size: 8 bytes > > Sector Start Addresses: > 00000000 RO 00002000 RO 00004000 RO 00006000 RO 00008000 > RO > 0000A000 RO 0000C000 RO 0000E000 RO 00010000 RO 00020000 > RO > 00030000 RO 00040000 RO 00050000 RO 00060000 RO 00070000 > RO > 00080000 RO 00090000 RO 000A0000 RO 000B0000 RO 000C0000 > RO > 000D0000 RO 000E0000 RO 000F0000 RO 00100000 RO 00110000 > RO > 00120000 RO 00130000 RO 00140000 RO 00150000 RO 00160000 > RO > 00170000 RO 00180000 RO 00190000 RO 001A0000 RO 001B0000 > RO > 001C0000 RO 001D0000 RO 001E0000 RO 001F0000 RO 00200000 > RO > 00210000 RO 00220000 RO 00230000 RO 00240000 RO 00250000 > RO > 00260000 RO 00270000 RO 00280000 RO 00290000 RO 002A0000 > RO > 002B0000 RO 002C0000 RO 002D0000 RO 002E0000 RO 002F0000 > RO > 00300000 RO 00310000 RO 00320000 RO 00330000 RO 00340000 > RO > 00350000 RO 00360000 RO 00370000 RO 00380000 RO 00390000 > RO > 003A0000 RO 003B0000 RO 003C0000 RO 003D0000 RO 003E0000 > RO > 003F0000 RO 00400000 RO 00410000 RO 00420000 RO 00430000 > RO > 00440000 RO 00450000 RO 00460000 RO 00470000 RO 00480000 > RO > 00490000 RO 004A0000 RO 004B0000 RO 004C0000 RO 004D0000 > RO > 004E0000 RO 004F0000 RO 00500000 RO 00510000 RO 00520000 > RO > 00530000 RO 00540000 RO 00550000 RO 00560000 RO 00570000 > RO > 00580000 RO 00590000 RO 005A0000 RO 005B0000 RO 005C0000 > RO > 005D0000 RO 005E0000 RO 005F0000 RO 00600000 RO 00610000 > RO > 00620000 RO 00630000 RO 00640000 RO 00650000 RO 00660000 > RO > 00670000 RO 00680000 RO 00690000 RO 006A0000 RO 006B0000 > RO > 006C0000 RO 006D0000 RO 006E0000 RO 006F0000 RO 00700000 > RO > 00710000 RO 00720000 RO 00730000 RO 00740000 RO 00750000 > RO > 00760000 RO 00770000 RO 00780000 RO 00790000 RO 007A0000 > RO > 007B0000 RO 007C0000 RO 007D0000 RO 007E0000 RO 007F0000 > RO > > > /****************************** > Unprotecting memory > *******************************/ > > U-Boot> protect off 0x20000 0x7effff > > /****************************** > Flash info > *******************************/ > U-Boot> fli > > > Bank # 1: CFI conformant FLASH (16 x 16) Size: 8 MB in 135 Sectors > Intel Standard command set, Manufacturer ID: 0x20, Device ID: 0x49 > Erase timeout: 8192 ms, write timeout: 1 ms > Buffer write timeout: 1 ms, buffer size: 8 bytes > > Sector Start Addresses: > 00000000 RO 00002000 RO 00004000 RO 00006000 RO 00008000 > RO > 0000A000 RO 0000C000 RO 0000E000 RO 00010000 RO 00020000 > 00030000 00040000 00050000 00060000 00070000 > 00080000 00090000 000A0000 000B0000 000C0000 > 000D0000 000E0000 000F0000 00100000 00110000 > 00120000 00130000 00140000 00150000 00160000 > 00170000 00180000 00190000 001A0000 001B0000 > 001C0000 001D0000 001E0000 001F0000 00200000 > 00210000 00220000 00230000 00240000 00250000 > 00260000 00270000 00280000 00290000 002A0000 > 002B0000 002C0000 002D0000 002E0000 002F0000 > > 00300000 00310000 00320000 00330000 00340000 > 00350000 00360000 00370000 00380000 00390000 > 003A0000 003B0000 003C0000 003D0000 003E0000 > 003F0000 00400000 00410000 00420000 00430000 > 00440000 00450000 00460000 00470000 00480000 > 00490000 004A0000 004B0000 004C0000 004D0000 > 004E0000 004F0000 00500000 00510000 00520000 > 00530000 00540000 00550000 00560000 00570000 > > 00580000 00590000 005A0000 005B0000 005C0000 > 005D0000 005E0000 005F0000 00600000 00610000 > 00620000 00630000 00640000 00650000 00660000 > 00670000 00680000 00690000 006A0000 006B0000 > 006C0000 006D0000 006E0000 006F0000 00700000 > 00710000 00720000 00730000 00740000 00750000 > 00760000 00770000 00780000 00790000 007A0000 > 007B0000 007C0000 007D0000 007E0000 007F0000 > RO > > Un-Protected 125 sectors > > /****************************** > Erasing memory > *******************************/ > > U-Boot> erase 0x20000 0x7effff > > > fwc addr 00020000 cmd 50 0050 16bit x 16 bit > fwc addr 00020000 cmd 20 0020 16bit x 16 bit > fwc addr 00020000 cmd d0 00d0 16bit x 16 bit > flash_is_busy: 0 > ........ > fwc addr 007d0000 cmd ff 00ff 16bit x 16 bit > .fwc addr 007e0000 cmd 50 0050 16bit x 16 bit > fwc addr 007e0000 cmd 20 0020 16bit x 16 bit > fwc addr 007e0000 cmd d0 00d0 16bit x 16 bit > flash_is_busy: 0 > fwc addr 007e0000 cmd ff 00ff 16bit x 16 bit > . done > Erased 125 sectors > > /****************************** > Display memory at 0x20000 > *******************************/ > > U-Boot> md.b 0x20000 > > 00020000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ > 00020010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ > 00020020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ > 00020030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ > > /****************************** > I want to try to copy some bytes to the memory with the cp.b command. > This works with the at49bc642d flash. > Look at the memory at 0x90000000 in ram before copying it to flash at > 0x20000 > *******************************/ > U-Boot> md.b 0x90000000 > > 90000000: 00 00 00 00 33 cc 63 4c 77 cc 13 48 23 ec 37 dc ....3.cLw..H#.7. > 90000010: 13 ce 33 cc 33 cc b3 cc 37 cc 73 ce 31 cc 33 cc ..3.3...7.s.1.3. > > /****************************** > Copy from RAM memory at 0x90000000 to Flash memory, this works on a > normal ngw100 with at49bv642d > *******************************/ > U-Boot> cp.b 0x90000000 0x20000 0x10 > > Copy to Flash... fwc addr (null) cmd 50 0050 16bit x 16 bit > fwc addr (null) cmd 40 0040 16bit x 16 bit > flash_is_busy: 0 > fwc addr 00020000 cmd ff 00ff 16bit x 16 bit > fwc addr (null) cmd 50 0050 16bit x 16 bit > fwc addr (null) cmd 40 0040 16bit x 16 bit > ...... > flash_is_busy: 0 > fwc addr 00020000 cmd ff 00ff 16bit x 16 bit > fwc addr (null) cmd 50 0050 16bit x 16 bit > fwc addr (null) cmd 40 0040 16bit x 16 bit > flash_is_busy: 0 > fwc addr 00020000 cmd ff 00ff 16bit x 16 bit > done > > /****************************** > Display memory at 0x20000, nothing has been written. > *******************************/ > U-Boot> md.b 0x20000 > > 00020000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ > 00020010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ > U-Boot> > _______________________________________________ > U-Boot mailing list > [email protected] > http://lists.denx.de/mailman/listinfo/u-boot > . > _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

