added a couple of LOG_ERROR() messages to improve logfile.

git-svn-id: svn://svn.berlios.de/openocd/trunk@548 b42882b7-edfa-0310-969c-e2dbd0fdcd60
__archive__
oharboe 2008-04-08 16:27:50 +00:00
parent eabb49b570
commit a4ed848171
3 changed files with 10 additions and 2 deletions

View File

@ -354,6 +354,7 @@ int cfi_read_intel_pri_ext(flash_bank_t *bank)
target->type->write_memory(target, flash_address(bank, 0, 0x0), bank->bus_width, 1, command);
cfi_command(bank, 0xff, command);
target->type->write_memory(target, flash_address(bank, 0, 0x0), bank->bus_width, 1, command);
LOG_ERROR("Could not read bank flash bank information");
return ERROR_FLASH_BANK_INVALID;
}
@ -407,6 +408,7 @@ int cfi_read_spansion_pri_ext(flash_bank_t *bank)
{
cfi_command(bank, 0xf0, command);
target->type->write_memory(target, flash_address(bank, 0, 0x0), bank->bus_width, 1, command);
LOG_ERROR("Could not read spansion bank information");
return ERROR_FLASH_BANK_INVALID;
}
@ -475,6 +477,7 @@ int cfi_read_atmel_pri_ext(flash_bank_t *bank)
{
cfi_command(bank, 0xf0, command);
target->type->write_memory(target, flash_address(bank, 0, 0x0), bank->bus_width, 1, command);
LOG_ERROR("Could not read atmel bank information");
return ERROR_FLASH_BANK_INVALID;
}
@ -1935,6 +1938,7 @@ int cfi_probe(struct flash_bank_s *bank)
target->type->write_memory(target, flash_address(bank, 0, 0x0), bank->bus_width, 1, command);
cfi_command(bank, 0xff, command);
target->type->write_memory(target, flash_address(bank, 0, 0x0), bank->bus_width, 1, command);
LOG_ERROR("Could not probe bank");
return ERROR_FLASH_BANK_INVALID;
}

View File

@ -195,10 +195,11 @@ int loadDriver(ecosflash_flash_bank_t *info)
image.base_address_set = 0;
image.start_address_set = 0;
target_t *target=info->target;
int retval;
if (image_open(&image, info->driverPath, NULL) != ERROR_OK)
if ((retval=image_open(&image, info->driverPath, NULL)) != ERROR_OK)
{
return ERROR_FLASH_BANK_INVALID;
return retval;
}
info->start_address=image.start_address;

View File

@ -884,7 +884,10 @@ int flash_erase_address_range(target_t *target, u32 addr, u32 length)
return ERROR_FLASH_DST_OUT_OF_BANK; /* no corresponding bank found */
if (c->size == 0 || c->num_sectors == 0)
{
LOG_ERROR("Bank is invalid");
return ERROR_FLASH_BANK_INVALID;
}
if (length == 0)
{