summaryrefslogtreecommitdiff
path: root/include/configs/munices.h
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-06-21 22:29:59 +0200
committerWolfgang Denk <wd@denx.de>2010-06-23 02:09:20 +0200
commit460c2ce362e56890c2a029e2c3b1ff2796c7fc54 (patch)
tree625be474d895469685f41febbe93f278542076f3 /include/configs/munices.h
parent47ea6edfb3004fb2d2a979e19c3f6e4e32f45e51 (diff)
downloadu-boot-imx-460c2ce362e56890c2a029e2c3b1ff2796c7fc54.zip
u-boot-imx-460c2ce362e56890c2a029e2c3b1ff2796c7fc54.tar.gz
u-boot-imx-460c2ce362e56890c2a029e2c3b1ff2796c7fc54.tar.bz2
MPC5200: workaround data corruption for unaligned local bus accesses
The MPC5200 has a nasty problem that will cause silent data corruption when performing unaligned 16 or 32 byte accesses when reading from the local bus - typically this affects reading from flash. The problem can be easily shown: => md fc0c0000 10 fc0c0000: 323e4337 01626f6f 74636d64 3d72756e 2>C7.bootcmd=run fc0c0010: 206e6574 5f6e6673 00626f6f 7464656c net_nfs.bootdel fc0c0020: 61793d35 00626175 64726174 653d3131 ay=5.baudrate=11 fc0c0030: 35323030 00707265 626f6f74 3d656368 5200.preboot=ech => md fc0c0001 10 fc0c0001: 65636801 00000074 0000003d 00000020 ech....t...=... fc0c0011: 0000005f 00000000 00000074 00000061 ..._.......t...a fc0c0021: 00000000 00000064 00000065 00000035 .......d...e...5 fc0c0031: 00000000 00000062 0000003d 0000006f .......b...=...o => md.w fc0c0001 10 fc0c0001: 0000 3701 0000 6f74 0000 643d 0000 6e20 ..7...ot..d=..n fc0c0011: 0000 745f 0000 7300 0000 6f74 0000 6c61 ..t_..s...ot..la This commit implements a workaround at least for the most blatant problem: using memcpy() from NOR flash. We rename the assembler routine into __memcpy() and provide a wrapper, which will use a byte-wise copy loop for unaligned source or target addresses when reading from NOR flash, and branch to the optimized __memcpy() in all other cases, thus minimizing the performance impact. Tested on lite5200b and TQM5200S. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
Diffstat (limited to 'include/configs/munices.h')
0 files changed, 0 insertions, 0 deletions