From 35b3c95299a97c05078f7dd662d66c89a356869d Mon Sep 17 00:00:00 2001 From: oharboe Date: Fri, 4 Apr 2008 13:47:38 +0000 Subject: - reverted some of the changes that possibly broke arm926ejs. Waiting for a bit more info before I can tell with confidence whether or not this would have any effect. - worked on error propagation and output for flash git-svn-id: svn://svn.berlios.de/openocd/trunk@539 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/flash/ecos.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/flash/ecos.c') diff --git a/src/flash/ecos.c b/src/flash/ecos.c index f467b74d..8b64b2d7 100644 --- a/src/flash/ecos.c +++ b/src/flash/ecos.c @@ -211,10 +211,9 @@ int loadDriver(ecosflash_flash_bank_t *info) int retval; if ((retval = image_read_section(&image, i, 0x0, image.sections[i].size, buffer, &buf_cnt)) != ERROR_OK) { - LOG_ERROR("image_read_section failed with error code: %i", retval); free(buffer); image_close(&image); - return ERROR_FLASH_BANK_INVALID; + return retval; } target_write_buffer(target, image.sections[i].base_address, buf_cnt, buffer); image_size += buf_cnt; @@ -303,7 +302,7 @@ int eCosBoard_erase(ecosflash_flash_bank_t *info, u32 address, u32 len) if (flashErr != 0x0) { LOG_ERROR("Flash erase failed with %d (%s)\n", flashErr, flash_errmsg(flashErr)); - return ERROR_JTAG_DEVICE_ERROR; + return ERROR_FAIL; } return ERROR_OK; @@ -362,7 +361,7 @@ int eCosBoard_flash(ecosflash_flash_bank_t *info, void *data, u32 address, u32 l if (flashErr != 0x0) { LOG_ERROR("Flash prog failed with %d (%s)\n", flashErr, flash_errmsg(flashErr)); - return ERROR_JTAG_DEVICE_ERROR; + return ERROR_FAIL; } } return ERROR_OK; -- cgit v1.2.3