Hi Friends, I have my custom board with MCF5329 processor and M29W128GL (16MB NOR). I have LTIB package from freescale of M5329EVB board. I am using this package and modified according M29W128GL NOR. Like
* FLASH organization */ #define CONFIG_SYS_FLASH_CFI #ifdef CONFIG_SYS_FLASH_CFI # define CONFIG_FLASH_CFI_DRIVER 1 # define CONFIG_SYS_FLASH_SIZE 0x1000000 /* Max size that the board might have */ # define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT # define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ # define CONFIG_SYS_MAX_FLASH_SECT 137 /* max number of sectors on one chip */ # define CONFIG_SYS_FLASH_PROTECTION /* "Real" (hardware) sectors protection */ #endif And Enviroment Configuration: #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_CS0_BASE /* Configuration for environment * Environment is embedded in u-boot in the second sector of the flash */ #define CONFIG_ENV_OFFSET 0x40000 #define CONFIG_ENV_SECT_SIZE 0x20000 #define CONFIG_ENV_SIZE 0x2000 #define CONFIG_ENV_IS_IN_FLASH 1 And U-boot output after flash using JTAG: U-Boot 2011.09 (Jan 15 2013 - 14:03:02) CPU: BTAM MCF5329 (Mask:54 Version:2) CPU CLK 240 MHz BUS CLK 80 MHz Board: BTAM 5329 I2C: ready DRAM: 32 MiB Reserving 512k for protected RAM at 41f80000 Top of RAM usable for U-Boot at: 41f80000 Reserving 155k for U-Boot at: 41f59000 Reserving 256k for malloc() at: 41f19000 Reserving 58 Bytes for Board Info at: 41f18fc6 Reserving 88 Bytes for Global Data at: 41f18f6e Reserving 64k for boot parameters at: 41f08f6e Stack Pointer at: 41f08f48 Start relocate of code from 00000400 to 41f59000 Now running in RAM - U-Boot at: 41f59000 Flash: flash detect cfi fwc addr (null) cmd f0 f000 16bit x 8 bit fwc addr 000000aa cmd 98 9800 16bit x 8 bit is= cmd 51(Q) addr 00000020 is= 5100 5100 is= cmd 52(R) addr 00000022 is= 5200 5200 is= cmd 59(Y) addr 00000024 is= 5900 5900 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 b5 c5 04 QRY..@.....'6... 10 : 04 09 10 04 02 03 04 18 02 00 06 00 01 7f 00 00 ................ 20 : 02 00 00 00 00 00 00 00 00 00 00 00 00 41 f0 8e .............A.. fwc addr (null) cmd f0 f0 8bit x 8 bit fwc addr 00000aaa cmd aa aa 8bit x 8 bit fwc addr 00000555 cmd 55 55 8bit x 8 bit fwc addr 00000aaa cmd 90 90 8bit x 8 bit fwc addr (null) cmd f0 f0 8bit x 8 bit fwc addr 000000aa cmd 98 9800 16bit x 8 bit manufacturer is 2 manufacturer id is 0x0 device id is 0x22 device id2 is 0x0 cfi version is 0x3133 size_ratio 1 port 16 bits chip 8 bits found 1 erase regions erase region 0: 0x0200007f erase_region_count = 128 erase_region_size = 131072 fwc addr (null) cmd f0 f0 8bit x 8 bit Portwidth: 1 Chipwidth: 1 Man ID : 0 Device ID: 34 flash_protect ON: from 0x00000400 to 0x000213FF fwc addr (null) cmd 70 70 8bit x 8 bit flash_is_busy: 0 protect on 0 fwc addr 00020000 cmd 70 70 8bit x 8 bit flash_is_busy: 0 protect on 1 flash_protect ON: from 0x00040000 to 0x0005FFFF fwc addr 00040000 cmd 70 70 8bit x 8 bit flash_is_busy: 0 protect on 2 16 MiB *** Warning - bad CRC, using default environment Destroy Hash Table: 41f7beb4 table = (null) Create Hash Table: N=105 INSERT: table 41f7beb4, filled 1/107 rv 41f19414 ==> name="bootdelay" value="5" INSERT: table 41f7beb4, filled 2/107 rv 41f19480 ==> name="baudrate" value="115200" INSERT: table 41f7beb4, filled 3/107 rv 41f1936c ==> name="ethaddr" value="00:e0:0c:bc:e5:60" INSERT: table 41f7beb4, filled 4/107 rv 41f1930c ==> name="ipaddr" value="192.162.1.2" INSERT: table 41f7beb4, filled 5/107 rv 41f194e0 ==> name="serverip" value="192.162.1.1" INSERT: table 41f7beb4, filled 6/107 rv 41f191d4 ==> name="gatewayip" value="192.162.1.1" INSERT: table 41f7beb4, filled 7/107 rv 41f19654 ==> name="netmask" value="255.255.255.0" INSERT: table 41f7beb4, filled 8/107 rv 41f194a4 ==> name="hostname" value="M5329EVB" INSERT: table 41f7beb4, filled 9/107 rv 41f1954c ==> name="netdev" value="eth0" INSERT: table 41f7beb4, filled 10/107 rv 41f194ec ==> name="loadaddr" value="40010000" INSERT: table 41f7beb4, filled 11/107 rv 41f19564 ==> name="u-boot" value="u-boot.bin" INSERT: table 41f7beb4, filled 12/107 rv 41f194b0 ==> name="load" value="tftp ${loadaddr) ${u-boot}" INSERT: table 41f7beb4, filled 13/107 rv 41f1960c ==> name="upd" value="run load; run prog" INSERT: table 41f7beb4, filled 14/107 rv 41f193cc ==> name="prog" value="prot off 0 3ffff;era 0 3ffff;cp.b ${loadaddr} 0 ${filesize};save" INSERT: free(data = 41f19008) INSERT: done In: serial Out: serial Err: serial U-Boot relocated to 41f59000 Net: No PHY device found. FEC0 ### main_loop entered: bootdelay=5 ### main_loop: bootcmd="<UNDEFINED>" -> saveenv Saving Environment to Flash... Data to save 0x1f000, 0x40000, 0x5ffff Data (start 0x41000, len 0x1f000) saved at 0x41f1a058 Protect off 00040000 ... 0005FFFF Un-Protecting sectors 2..2 in bank 1 fwc addr 00040000 cmd 70 70 8bit x 8 bit flash_is_busy: 0 . done Un-Protected 1 sectors EXPORT table = 41f7beb4, htab.size = 107, htab.filled = 19, size = 4092 Unsorted: n=19 0: 41f191d4 ==> gatewayip => 192.162.1.1 1: 41f191e0 ==> stdout => serial 2: 41f192d0 ==> stderr => serial 3: 41f1930c ==> ipaddr => 192.162.1.2 4: 41f1936c ==> ethaddr => 00:e0:0c:bc:e5:60 5: 41f1939c ==> stdin => serial 6: 41f193cc ==> prog => prot off 0 3ffff;era 0 3ffff;cp.b ${loadaddr} 0 ${filesize};save 7: 41f19414 ==> bootdelay => 5 8: 41f19480 ==> baudrate => 115200 9: 41f194a4 ==> hostname => M5329EVB 10: 41f194b0 ==> load => tftp ${loadaddr) ${u-boot} 11: 41f194e0 ==> serverip => 192.162.1.1 12: 41f194ec ==> loadaddr => 40010000 13: 41f1951c ==> mem => 32256k 14: 41f1954c ==> netdev => eth0 15: 41f19564 ==> u-boot => u-boot.bin 16: 41f195b8 ==> ethact => FEC0 17: 41f1960c ==> upd => run load; run prog 18: 41f19654 ==> netmask => 255.255.255.0 Erasing Flash...!Erase Flash from 0x00040000 to 0x0005ffff in Bank # 1 fwc addr 00040aaa cmd aa aa 8bit x 8 bit fwc addr 00040555 cmd 55 55 8bit x 8 bit fwc addr 00040aaa cmd 80 80 8bit x 8 bit fwc addr 00040aaa cmd aa aa 8bit x 8 bit fwc addr 00040555 cmd 55 55 8bit x 8 bit fwc addr 00040000 cmd 30 30 8bit x 8 bit flash_is_busy: 0 . done Erased 1 sectors Writing to Flash...! My Debug info :Flash Addr = 40000, Config Env Size = 20000, Env Size = 1fffc Flash not Erased Protecting sectors 2..2 in bank 1 fwc addr 00040000 cmd 70 70 8bit x 8 bit flash_is_busy: 0 . done Protected 1 sectors -> I am having problem with Flash Not Erased. Please help me. Thanks & Warm Regards, Ramesh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Disclaimer~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Information contained and transmitted by this e-mail is confidential and proprietary to iGATE and its affiliates and is intended for use only by the recipient. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, copying or use of this e-mail is strictly prohibited and you are requested to delete this e-mail immediately and notify the originator or mailad...@igate.com <mailto:mailad...@igate.com>. iGATE does not enter into any agreement with any party by e-mail. Any views expressed by an individual do not necessarily reflect the view of iGATE. iGATE is not responsible for the consequences of any actions taken on the basis of information provided, through this email. The contents of an attachment to this e-mail may contain software viruses, which could damage your own computer system. While iGATE has taken every reasonable precaution to minimise this risk, we cannot accept liability for any damage which you sustain as a result of software viruses. You should carry out your own virus checks before opening an attachment. To know more about iGATE please visit www.igate.com <http://www.igate.com>. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot