Skip to contentSkip to conversation

TQM8xxL flash memory write problem

U-Boot Thomas Maenner 2 participants 3 messages Dec 8, 2008

lore
Share & tools
lore
#0 lore raw

Hi Everybody,

for reason, I am having the following problem with u-boot 1.3.4 and 1.3.3 (no other tested; very old versions are fine).
Using the u-boot with TQM823L_config after reloading u-boot with bdi2000, using the following commands (see below and they worked before too)

- erase all flash; except u-boot
- download image via tftp to 200000
- copy data to flash
- fli shows both banks written to...

I noted the following:
- range 40400000 4043ffff has been written too after copying u-boot
- range 40440000 404fffff has been written too after copying kernel

Any idea on what's going on here - I'm confused... ;)

Lengthy output below.

Thanks in advance for your help
Tom

---bdi commands---
rm der 0x2006000f
erase 00000000
erase 0x008000
erase 0x00c000
erase 0x010000
erase 0x020000
prog 0 /tftpboot/u-boot.bin bin
rm der 0x2002000f
---end---

---output---
U-Boot 1.3.4 (Dec 8 2008 - 12:34:56)

CPU:   PPC823EZTnnB2 at 50 MHz: 16 kB I-Cache 8 kB D-Cache
Board: ### No HW ID - assuming TQM8xxL                    
DRAM:  16 MB                                              
FLASH:  8 MB                                              
In:    serial                                             
Out:   serial                                             
Err:   serial                                             
Net:   SCC ETHERNET                                       
PCMCIA:   No Card found                                   

Type "run flash_nfs" to mount root filesystem over NFS

Hit any key to stop autoboot: 0
=> setenv serial# TQM823LDB0A3-E50I.312 11169127
=> setenv ethaddr 00:D0:93:06:52:7B
=> saveenv
Saving Environment to Flash...
Un-Protected 1 sectors
Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash... done
Protected 1 sectors
Protected 1 sectors
=> printe
bootcmd=run flash_self
bootdelay=5
baudrate=115200
loads_echo=1
preboot=echo;echo Type \"run flash_nfs\" to mount root filesystem over NFS;echo
netdev=eth0
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ramargs=setenv bootargs root=/dev/ram rw
addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:
${netmask}:${hostname}:${netdev}:off panic=1
flash_nfs=run nfsargs addip;bootm ${kernel_addr}
flash_self=run ramargs addip;bootm ${kernel_addr} ${ramdisk_addr} net_nfs=tftp 200000 ${bootfile};run nfsargs addip;bootm rootpath=/opt/eldk/ppc_8xx
hostname=TQM823L
bootfile=TQM823L/uImage
fdt_addr=40040000
kernel_addr=40060000
ramdisk_addr=40200000
u-boot=TQM823L/u-image.bin
load=tftp 200000 ${u-boot}
update=prot off 40000000 +${filesize};era 40000000 +${filesize};cp.b 200000 40000000 ${filesize};sete filesize;save
stdin=serial
stdout=serial
stderr=serial
ethact=SCC ETHERNET
bootcount=5
serial#=TQM823LDB0A3-E50I.312 11169127 ethaddr=00:D0:93:06:52:7B

Environment size: 995/16379 bytes
=> setenv ipaddr 172.24.240.2
=> setenv netmask 255.255.0.0
=> setenv gatewayip 172.24.240.2
=> setenv serverip 172.24.80.6
=> fli

Bank # 1: CFI conformant FLASH (32 x 16) Size: 4 MB in 35 Sectors
AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x2249 Erase timeout: 16384 ms, write timeout: 1 ms

Sector Start Addresses:
40000000 RO 40008000 RO 4000C000 RO 40010000 RO 40020000
RO

  40040000 E      40060000 E      40080000 E      400A0000 E      400C0000 E    
  400E0000 E      40100000 E      40120000 E      40140000 E      40160000 E    
  40180000 E      401A0000 E      401C0000 E      401E0000 E      40200000 E    
  40220000 E      40240000 E      40260000 E      40280000 E      402A0000 E    
  402C0000 E      402E0000 E      40300000 E      40320000 E      40340000 E    
  40360000 E      40380000 E      403A0000 E      403C0000 E      403E0000 E    

Bank # 2: CFI conformant FLASH (32 x 16) Size: 4 MB in 35 Sectors
AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x2249 Erase timeout: 16384 ms, write timeout: 1 ms

Sector Start Addresses:

  40400000        40408000        4040C000        40410000        40420000      
  40440000 E      40460000 E      40480000 E      404A0000 E      404C0000 E
  404E0000 E      40500000 E      40520000 E      40540000 E      40560000 E
  40580000 E      405A0000 E      405C0000 E      405E0000 E      40600000 E
  40620000 E      40640000 E      40660000 E      40680000 E      406A0000 E
  406C0000 E      406E0000 E      40700000 E      40720000 E      40740000 E
  40760000 E      40780000 E      407A0000 E      407C0000 E      407E0000 E

=> tftp 200000 /tftpboot/fox1_2/uImage
Using SCC ETHERNET device
TFTP from server 172.24.80.6; our IP address is 172.24.240.2 Filename '/tftpboot/fox1_2/uImage'.
Load address: 0x200000
Loading: ################################################# done
Bytes transferred = 711528 (adb68 hex)
=> imi 200000

## Checking Image at 00200000 ...
Legacy image found

   Image Name:   Linux-2.4.25
   Created:      2008-12-06   3:03:53 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    711464 Bytes = 694.8 kB

Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
=> cp.b 200000 40040000 ${filesize}
Copy to Flash... done
=> fli

Bank # 1: CFI conformant FLASH (32 x 16) Size: 4 MB in 35 Sectors
AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x2249 Erase timeout: 16384 ms, write timeout: 1 ms

Sector Start Addresses:
40000000 RO 40008000 RO 4000C000 RO 40010000 RO 40020000
RO

  40040000        40060000        40080000        400A0000        400C0000
  400E0000        40100000 E      40120000 E      40140000 E      40160000 E
  40180000 E      401A0000 E      401C0000 E      401E0000 E      40200000 E
  40220000 E      40240000 E      40260000 E      40280000 E      402A0000 E
  402C0000 E      402E0000 E      40300000 E      40320000 E      40340000 E
  40360000 E      40380000 E      403A0000 E      403C0000 E      403E0000 E

Bank # 2: CFI conformant FLASH (32 x 16) Size: 4 MB in 35 Sectors
AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x2249 Erase timeout: 16384 ms, write timeout: 1 ms

Sector Start Addresses:

  40400000        40408000        4040C000        40410000        40420000
  40440000        40460000        40480000        404A0000        404C0000
  404E0000        40500000 E      40520000 E      40540000 E      40560000 E
  40580000 E      405A0000 E      405C0000 E      405E0000 E      40600000 E
  40620000 E      40640000 E      40660000 E      40680000 E      406A0000 E
  406C0000 E      406E0000 E      40700000 E      40720000 E      40740000 E
  40760000 E      40780000 E      407A0000 E      407C0000 E      407E0000 E

=>
----end---

Signature · 4 lines
We have clearance, Clarence, Roger, Roger. What's our vector, Victor?
--
Thomas Maenner
E-Mail: mailto:tmaenner at aehr.com
#1 lore raw

Dear Thomas Maenner,

Quoted 3 lines · In message <[email protected]> you wrote:

for reason, I am having the following problem with u-boot 1.3.4 and 1.3.3 (no other tested; very old versions are fine).

Current versions are fine, too.

Quoted 1 line

Any idea on what's going on here - I'm confused... ;)

There was a bug introduced when switching to use the CFI flash driver. This was fixed later:

commit 7c803be2eb3cae245dedda438776e08fb122250f

Author: Wolfgang Denk <[email protected]>
Date:   Tue Sep 16 18:02:19 2008 +0200 

TQM8xx: Fix CFI flash driver support for all TQM8xx based boards

After switching to using the CFI flash driver, the correct remapping of the flash banks was forgotten.

Also, some boards were not adapted, and the old legacy flash driver was not removed yet.

Please just use current code (like release v2008.10).

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It is wrong always, everywhere and for everyone to  believe  anything
upon  insufficient  evidence.  - W. K. Clifford, British philosopher,
circa 1876
#2 lore raw

Dear Wolfgang Denk,

Thanks much for the quick reply and fix - that did the trick.

Tom

--
Thomas Maenner
E-Mail: mailto:tmaenner at aehr.com