From f07771cc288eb86cad8f8a5c1aa593caf2ba26f8 Mon Sep 17 00:00:00 2001 From: wdenk Date: Wed, 28 May 2003 08:06:31 +0000 Subject: * 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. --- board/trab/flash.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'board/trab/flash.c') diff --git a/board/trab/flash.c b/board/trab/flash.c index 27c2a5b490..1550e175a4 100644 --- a/board/trab/flash.c +++ b/board/trab/flash.c @@ -431,7 +431,15 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) * 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); } -- cgit v1.2.1