* Fix data abort exception handling for arm920t CPU
* Fix alignment problems with flash driver for TRAB board
* Patch by Donald White, 21 May 2003:
fix calculation of base address in pci_hose_config_device()
* Fix bug in command line parsing: "cmd1;cmd2" is supposed to always
execute "cmd2", even if "cmd1" fails. Note that this is different
to "run var1 var2" where the contents of "var2" will NOT be
executed when a command in "var1" fails.
diff --git a/board/trab/flash.c b/board/trab/flash.c
index 27c2a5b..1550e17 100644
--- a/board/trab/flash.c
+++ b/board/trab/flash.c
@@ -431,7 +431,15 @@
* handle word aligned part
*/
while (cnt >= 4) {
- data = *((vu_long *) src);
+ if (((ulong)src) & 0x3) {
+ for (i = 0; i < 4; i++) {
+ ((char *)&data)[i] = ((vu_char *)src)[i];
+ }
+ }
+ else {
+ data = *((vu_long *) src);
+ }
+
if ((rc = write_word (info, wp, data)) != 0) {
return (rc);
}