summaryrefslogtreecommitdiff
path: root/board/trab
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-07-19 14:07:21 +0200
committerWolfgang Denk <wd@pollux.denx.de>2006-07-19 14:07:21 +0200
commit0de7fa59391fa529bec4ef11647f063f67fd9786 (patch)
tree33c57ce629e5723869e72a2b3deb8fee59a7345c /board/trab
parentb87dfd2854809ddcf4be54d772752e7ed137386f (diff)
downloadu-boot-imx-0de7fa59391fa529bec4ef11647f063f67fd9786.zip
u-boot-imx-0de7fa59391fa529bec4ef11647f063f67fd9786.tar.gz
u-boot-imx-0de7fa59391fa529bec4ef11647f063f67fd9786.tar.bz2
Add additional error messages to flash driver on TRAB board
(for erase errors and timeout errors) Patch by Martin Krause, 14 Feb 2006
Diffstat (limited to 'board/trab')
-rw-r--r--board/trab/flash.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/board/trab/flash.c b/board/trab/flash.c
index 8cdd824..77a6fc2 100644
--- a/board/trab/flash.c
+++ b/board/trab/flash.c
@@ -281,10 +281,12 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
if (chip1 == ERR || chip2 == ERR) {
rc = ERR_PROG_ERROR;
+ printf ("Flash erase error\n");
goto outahere;
}
if (chip1 == TMO) {
rc = ERR_TIMOUT;
+ printf ("Flash erase timeout error\n");
goto outahere;
}
}
@@ -384,8 +386,13 @@ static int write_word (flash_info_t * info, ulong dest, ulong data)
*addr = CMD_READ_ARRAY;
- if (chip1 == ERR || chip2 == ERR || *addr != data)
+ if (chip1 == ERR || chip2 == ERR || *addr != data) {
rc = ERR_PROG_ERROR;
+ printf ("Flash program error\n");
+ debug ("chip1: %#x, chip2: %#x, addr: %#lx *addr: %#lx, "
+ "data: %#lx\n",
+ chip1, chip2, addr, *addr, data);
+ }
if (iflag)
enable_interrupts ();