Commit f90d8fa4 authored by zwelch's avatar zwelch
Browse files

Remove whitespace that occurs after '('.

- Replace '([ \t]*' with '('.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2376 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent 6d1d58a1
......@@ -93,7 +93,7 @@ struct tftpd_fileops fileops =
(int (*)(const char *, int))open,
close,
(int (*)(int, const void *, int))write,
( int (*)(int, void *, int))read
(int (*)(int, void *, int))read
};
#endif
......@@ -253,7 +253,7 @@ void copyfile(char *name2, char *name1);
void copydir(char *name, char *destdir);
#if 0
MTAB_ENTRY( romfs_mte1,
MTAB_ENTRY(romfs_mte1,
"/rom",
"romfs",
"",
......@@ -1130,7 +1130,7 @@ static int tftpfs_fo_lseek(struct CYG_FILE_TAG *fp, off_t *apos, int whence);
// For simplicity we use _FILESYSTEM synchronization for all accesses since
// we should never block in any filesystem operations.
#if 1
FSTAB_ENTRY( tftpfs_fste, "tftpfs", 0,
FSTAB_ENTRY(tftpfs_fste, "tftpfs", 0,
CYG_SYNCMODE_NONE,
tftpfs_mount,
tftpfs_umount,
......@@ -1151,7 +1151,7 @@ FSTAB_ENTRY( tftpfs_fste, "tftpfs", 0,
// mtab entry.
// This defines a single ROMFS loaded into ROM at the configured address
//
// MTAB_ENTRY( rom_mte, // structure name
// MTAB_ENTRY(rom_mte, // structure name
// "/rom", // mount point
// "romfs", // FIlesystem type
// "", // hardware device
......@@ -1459,7 +1459,7 @@ static int logfs_fo_close(struct CYG_FILE_TAG *fp);
// This defines the entry in the filesystem table.
// For simplicity we use _FILESYSTEM synchronization for all accesses since
// we should never block in any filesystem operations.
FSTAB_ENTRY( logfs_fste, "logfs", 0,
FSTAB_ENTRY(logfs_fste, "logfs", 0,
CYG_SYNCMODE_FILE_FILESYSTEM | CYG_SYNCMODE_IO_FILESYSTEM,
logfs_mount,
logfs_umount,
......
......@@ -187,7 +187,7 @@ static void at91sam7_read_clock_info(flash_bank_t *bank)
}
/* Prescaler adjust */
if ( (((mckr & PMC_MCKR_PRES) >> 2) == 7) || (tmp == 0) )
if ((((mckr & PMC_MCKR_PRES) >> 2) == 7) || (tmp == 0) )
{
at91sam7_info->mck_valid = 0;
at91sam7_info->mck_freq = 0;
......@@ -707,7 +707,7 @@ static int at91sam7_protect_check(struct flash_bank_s *bank)
at91sam7_info->num_lockbits_on = 0;
for (lock_pos = 0; lock_pos < bank->num_sectors; lock_pos++)
{
if ( ((status >> (16 + lock_pos))&(0x0001)) == 1)
if (((status >> (16 + lock_pos))&(0x0001)) == 1)
{
at91sam7_info->num_lockbits_on++;
bank->sectors[lock_pos].is_protected = 1;
......@@ -725,7 +725,7 @@ static int at91sam7_protect_check(struct flash_bank_s *bank)
at91sam7_info->num_nvmbits_on = 0;
for (gpnvm_pos = 0; gpnvm_pos < at91sam7_info->num_nvmbits; gpnvm_pos++)
{
if ( ((status >> (8 + gpnvm_pos))&(0x01)) == 1)
if (((status >> (8 + gpnvm_pos))&(0x01)) == 1)
{
at91sam7_info->num_nvmbits_on++;
}
......@@ -907,7 +907,7 @@ static int at91sam7_erase(struct flash_bank_s *bank, int first, int last)
buffer[pos] = 0xFF;
}
if ( at91sam7_write(bank, buffer, bank->sectors[first].offset, nbytes) != ERROR_OK)
if (at91sam7_write(bank, buffer, bank->sectors[first].offset, nbytes) != ERROR_OK)
{
return ERROR_FLASH_OPERATION_FAILED;
}
......
......@@ -323,7 +323,7 @@ static int avrf_probe(struct flash_bank_s *bank)
return ERROR_FAIL;
}
LOG_INFO( "device id = 0x%08" PRIx32 "", device_id );
LOG_INFO("device id = 0x%08" PRIx32 "", device_id );
if (EXTRACT_MFG(device_id) != 0x1F)
{
LOG_ERROR("0x%" PRIx32 " is invalid Manufacturer for avr, 0x%X is expected", EXTRACT_MFG(device_id), 0x1F);
......@@ -402,7 +402,7 @@ static int avrf_info(struct flash_bank_s *bank, char *buf, int buf_size)
return ERROR_FAIL;
}
LOG_INFO( "device id = 0x%08" PRIx32 "", device_id );
LOG_INFO("device id = 0x%08" PRIx32 "", device_id );
if (EXTRACT_MFG(device_id) != 0x1F)
{
LOG_ERROR("0x%" PRIx32 " is invalid Manufacturer for avr, 0x%X is expected", EXTRACT_MFG(device_id), 0x1F);
......
......@@ -1154,7 +1154,7 @@ static int cfi_intel_write_block(struct flash_bank_s *bank, uint8_t *buffer, uin
/* flash write code */
if (!cfi_info->write_algorithm)
{
if ( target_code_size > sizeof(target_code) )
if (target_code_size > sizeof(target_code) )
{
LOG_WARNING("Internal error - target code buffer to small. Increase CFI_MAX_INTEL_CODESIZE and recompile.");
return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
......
......@@ -793,7 +793,7 @@ static int handle_flash_fill_command(struct command_context_s *cmd_ctx, char *cm
for (wrote = 0; wrote < (count*wordsize); wrote += cur_size)
{
cur_size = MIN( (count*wordsize - wrote), sizeof(chunk) );
cur_size = MIN((count*wordsize - wrote), sizeof(chunk) );
flash_bank_t *bank;
bank = get_flash_bank_by_addr(target, address);
if (bank == NULL)
......@@ -994,7 +994,7 @@ int flash_erase_address_range(target_t *target, uint32_t addr, uint32_t length)
}
}
if ( first == -1 || last == -1 )
if (first == -1 || last == -1 )
return ERROR_OK;
return flash_driver_erase(c, first, last);
......@@ -1127,7 +1127,7 @@ int flash_write(target_t *target, image_t *image, uint32_t *written, int erase)
if (erase)
{
/* calculate and erase sectors */
retval = flash_erase_address_range( target, run_address, run_size );
retval = flash_erase_address_range(target, run_address, run_size );
}
if (retval == ERROR_OK)
......
......@@ -114,10 +114,10 @@ non_cfi_t non_cfi_flashes[] = {
.num_erase_regions = 4,
.erase_region_info =
{
ERASE_REGION( 1, 16*KB),
ERASE_REGION( 2, 8*KB),
ERASE_REGION( 1, 32*KB),
ERASE_REGION( 7, 64*KB)
ERASE_REGION(1, 16*KB),
ERASE_REGION(2, 8*KB),
ERASE_REGION(1, 32*KB),
ERASE_REGION(7, 64*KB)
}
},
{
......@@ -131,10 +131,10 @@ non_cfi_t non_cfi_flashes[] = {
.num_erase_regions = 4,
.erase_region_info =
{
ERASE_REGION( 7, 64*KB),
ERASE_REGION( 1, 32*KB),
ERASE_REGION( 2, 8*KB),
ERASE_REGION( 1, 16*KB)
ERASE_REGION(7, 64*KB),
ERASE_REGION(1, 32*KB),
ERASE_REGION(2, 8*KB),
ERASE_REGION(1, 16*KB)
}
},
......@@ -236,10 +236,10 @@ non_cfi_t non_cfi_flashes[] = {
.num_erase_regions = 4,
.erase_region_info =
{
ERASE_REGION( 1, 16*KB),
ERASE_REGION( 2, 8*KB),
ERASE_REGION( 1, 32*KB),
ERASE_REGION( 7, 64*KB)
ERASE_REGION(1, 16*KB),
ERASE_REGION(2, 8*KB),
ERASE_REGION(1, 32*KB),
ERASE_REGION(7, 64*KB)
}
},
{
......@@ -253,10 +253,10 @@ non_cfi_t non_cfi_flashes[] = {
.num_erase_regions = 4,
.erase_region_info =
{
ERASE_REGION( 7, 64*KB),
ERASE_REGION( 1, 32*KB),
ERASE_REGION( 2, 8*KB),
ERASE_REGION( 1, 16*KB)
ERASE_REGION(7, 64*KB),
ERASE_REGION(1, 32*KB),
ERASE_REGION(2, 8*KB),
ERASE_REGION(1, 16*KB)
}
},
{
......@@ -270,9 +270,9 @@ non_cfi_t non_cfi_flashes[] = {
.num_erase_regions = 4,
.erase_region_info =
{
ERASE_REGION( 1, 16*KB),
ERASE_REGION( 2, 8*KB),
ERASE_REGION( 1, 32*KB),
ERASE_REGION(1, 16*KB),
ERASE_REGION(2, 8*KB),
ERASE_REGION(1, 32*KB),
ERASE_REGION(15, 64*KB)
}
},
......@@ -287,9 +287,9 @@ non_cfi_t non_cfi_flashes[] = {
.num_erase_regions = 4,
.erase_region_info =
{
ERASE_REGION( 1, 16*KB),
ERASE_REGION( 2, 8*KB),
ERASE_REGION( 1, 32*KB),
ERASE_REGION(1, 16*KB),
ERASE_REGION(2, 8*KB),
ERASE_REGION(1, 32*KB),
ERASE_REGION(15, 64*KB)
}
},
......@@ -304,9 +304,9 @@ non_cfi_t non_cfi_flashes[] = {
.num_erase_regions = 4,
.erase_region_info =
{
ERASE_REGION( 1, 16*KB),
ERASE_REGION( 2, 8*KB),
ERASE_REGION( 1, 32*KB),
ERASE_REGION(1, 16*KB),
ERASE_REGION(2, 8*KB),
ERASE_REGION(1, 32*KB),
ERASE_REGION(15, 64*KB)
}
},
......@@ -322,9 +322,9 @@ non_cfi_t non_cfi_flashes[] = {
.num_erase_regions = 4,
.erase_region_info =
{
ERASE_REGION( 1, 16*KB),
ERASE_REGION( 2, 8*KB),
ERASE_REGION( 1, 32*KB),
ERASE_REGION(1, 16*KB),
ERASE_REGION(2, 8*KB),
ERASE_REGION(1, 32*KB),
ERASE_REGION(31, 64*KB)
}
},
......@@ -340,9 +340,9 @@ non_cfi_t non_cfi_flashes[] = {
.erase_region_info =
{
ERASE_REGION(31, 64*KB),
ERASE_REGION( 1, 32*KB),
ERASE_REGION( 2, 8*KB),
ERASE_REGION( 1, 16*KB)
ERASE_REGION(1, 32*KB),
ERASE_REGION(2, 8*KB),
ERASE_REGION(1, 16*KB)
}
},
{
......@@ -356,8 +356,8 @@ non_cfi_t non_cfi_flashes[] = {
.num_erase_regions = 3,
.erase_region_info =
{
ERASE_REGION( 8, 8*KB),
ERASE_REGION( 2, 32*KB),
ERASE_REGION(8, 8*KB),
ERASE_REGION(2, 32*KB),
ERASE_REGION(30, 64*KB)
}
},
......@@ -373,8 +373,8 @@ non_cfi_t non_cfi_flashes[] = {
.erase_region_info =
{
ERASE_REGION(30, 64*KB),
ERASE_REGION( 2, 32*KB),
ERASE_REGION( 8, 8*KB)
ERASE_REGION(2, 32*KB),
ERASE_REGION(8, 8*KB)
}
},
{
......@@ -388,9 +388,9 @@ non_cfi_t non_cfi_flashes[] = {
.num_erase_regions = 4,
.erase_region_info =
{
ERASE_REGION( 1, 16*KB),
ERASE_REGION( 2, 8*KB),
ERASE_REGION( 1, 32*KB),
ERASE_REGION(1, 16*KB),
ERASE_REGION(2, 8*KB),
ERASE_REGION(1, 32*KB),
ERASE_REGION(15, 64*KB)
}
},
......
......@@ -189,7 +189,7 @@ int flash_verify(uint32 adr, unsigned int len, uint8 *src)
unsigned char *flash_ptr;
flash_ptr = (uint8 *)FLASH_AREA_ADDR + adr;
for ( ;len; len--) {
for (;len; len--) {
if (*(flash_ptr++)!=*(src++)) return FLASH_STAT_VERIFE;
}
return FLASH_STAT_OK;
......
......@@ -229,9 +229,9 @@ static int pic32mx_erase(struct flash_bank_s *bank, int first, int last)
{
LOG_DEBUG("Erasing entire program flash");
status = pic32mx_nvm_exec(bank, NVMCON_OP_PFM_ERASE, 50);
if ( status & NVMCON_NVMERR )
if (status & NVMCON_NVMERR )
return ERROR_FLASH_OPERATION_FAILED;
if ( status & NVMCON_LVDERR )
if (status & NVMCON_LVDERR )
return ERROR_FLASH_OPERATION_FAILED;
return ERROR_OK;
}
......@@ -245,9 +245,9 @@ static int pic32mx_erase(struct flash_bank_s *bank, int first, int last)
status = pic32mx_nvm_exec(bank, NVMCON_OP_PAGE_ERASE, 10);
if ( status & NVMCON_NVMERR )
if (status & NVMCON_NVMERR )
return ERROR_FLASH_OPERATION_FAILED;
if ( status & NVMCON_LVDERR )
if (status & NVMCON_LVDERR )
return ERROR_FLASH_OPERATION_FAILED;
bank->sectors[i].is_erased = 1;
}
......@@ -313,7 +313,7 @@ static int pic32mx_protect(struct flash_bank_s *bank, int set, int first, int la
reg = (i / pic32mx_info->ppage_size) / 8;
bit = (i / pic32mx_info->ppage_size) - (reg * 8);
if ( set )
if (set )
prot_reg[reg] &= ~(1 << bit);
else
prot_reg[reg] |= (1 << bit);
......@@ -327,7 +327,7 @@ static int pic32mx_protect(struct flash_bank_s *bank, int set, int first, int la
reg = (i / pic32mx_info->ppage_size) / 8;
bit = (i / pic32mx_info->ppage_size) - (reg * 8);
if ( set )
if (set )
prot_reg[reg] &= ~(1 << bit);
else
prot_reg[reg] |= (1 << bit);
......@@ -434,12 +434,12 @@ static int pic32mx_write_block(struct flash_bank_s *bank, uint8_t *buffer, uint3
}
#endif
status = pic32mx_write_row(bank, address, source->address);
if ( status & NVMCON_NVMERR ) {
if (status & NVMCON_NVMERR ) {
LOG_ERROR("Flash write error NVMERR (status = 0x%08" PRIx32 ")", status);
retval = ERROR_FLASH_OPERATION_FAILED;
break;
}
if ( status & NVMCON_LVDERR ) {
if (status & NVMCON_LVDERR ) {
LOG_ERROR("Flash write error LVDERR (status = 0x%08" PRIx32 ")", status);
retval = ERROR_FLASH_OPERATION_FAILED;
break;
......@@ -458,12 +458,12 @@ static int pic32mx_write_block(struct flash_bank_s *bank, uint8_t *buffer, uint3
memcpy(&value, buffer, sizeof(uint32_t));
uint32_t status = pic32mx_write_word(bank, address, value);
if ( status & NVMCON_NVMERR ) {
if (status & NVMCON_NVMERR ) {
LOG_ERROR("Flash write error NVMERR (status = 0x%08" PRIx32 ")", status);
retval = ERROR_FLASH_OPERATION_FAILED;
break;
}
if ( status & NVMCON_LVDERR ) {
if (status & NVMCON_LVDERR ) {
LOG_ERROR("Flash write error LVDERR (status = 0x%08" PRIx32 ")", status);
retval = ERROR_FLASH_OPERATION_FAILED;
break;
......@@ -564,9 +564,9 @@ static int pic32mx_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t of
memcpy(&value, buffer + bytes_written, sizeof(uint32_t));
status = pic32mx_write_word(bank, address, value);
if ( status & NVMCON_NVMERR )
if (status & NVMCON_NVMERR )
return ERROR_FLASH_OPERATION_FAILED;
if ( status & NVMCON_LVDERR )
if (status & NVMCON_LVDERR )
return ERROR_FLASH_OPERATION_FAILED;
bytes_written += 4;
......@@ -580,9 +580,9 @@ static int pic32mx_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t of
memcpy(&value, buffer + bytes_written, bytes_remaining);
status = pic32mx_write_word(bank, address, value);
if ( status & NVMCON_NVMERR )
if (status & NVMCON_NVMERR )
return ERROR_FLASH_OPERATION_FAILED;
if ( status & NVMCON_LVDERR )
if (status & NVMCON_LVDERR )
return ERROR_FLASH_OPERATION_FAILED;
}
......@@ -603,14 +603,14 @@ static int pic32mx_probe(struct flash_bank_s *bank)
pic32mx_info->probed = 0;
device_id = ejtag_info->idcode;
LOG_INFO( "device id = 0x%08" PRIx32 " (manuf 0x%03x dev 0x%02x, ver 0x%03x)",
LOG_INFO("device id = 0x%08" PRIx32 " (manuf 0x%03x dev 0x%02x, ver 0x%03x)",
device_id,
(unsigned)((device_id >> 1)&0x7ff),
(unsigned)((device_id >> 12)&0xff),
(unsigned)((device_id >> 20)&0xfff) );
if (((device_id >> 1)&0x7ff) != PIC32MX_MANUF_ID) {
LOG_WARNING( "Cannot identify target as a PIC32MX family." );
LOG_WARNING("Cannot identify target as a PIC32MX family." );
return ERROR_FLASH_OPERATION_FAILED;
}
......@@ -626,7 +626,7 @@ static int pic32mx_probe(struct flash_bank_s *bank)
break;
}
if (pic32mx_devs[i].name == NULL) {
LOG_WARNING( "Cannot identify target as a PIC32MX family." );
LOG_WARNING("Cannot identify target as a PIC32MX family." );
return ERROR_FLASH_OPERATION_FAILED;
}
}
......@@ -646,7 +646,7 @@ static int pic32mx_probe(struct flash_bank_s *bank)
}
#endif
LOG_INFO( "flash size = %dkbytes", num_pages );
LOG_INFO("flash size = %dkbytes", num_pages );
/* calculate numbers of pages */
num_pages /= (page_size / 1024);
......@@ -847,13 +847,13 @@ static int pic32mx_chip_erase(struct flash_bank_s *bank)
target_write_u32(target, PIC32MX_FLASH_CR, FLASH_LOCK);
if ( status & FLASH_WRPRTERR )
if (status & FLASH_WRPRTERR )
{
LOG_ERROR("pic32mx device protected");
return ERROR_OK;
}
if ( status & FLASH_PGERR )
if (status & FLASH_PGERR )
{
LOG_ERROR("pic32mx device programming failed");
return ERROR_OK;
......@@ -931,9 +931,9 @@ static int pic32mx_handle_pgm_word_command(struct command_context_s *cmd_ctx, ch
res = ERROR_OK;
status = pic32mx_write_word(bank, address, value);
if ( status & NVMCON_NVMERR )
if (status & NVMCON_NVMERR )
res = ERROR_FLASH_OPERATION_FAILED;
if ( status & NVMCON_LVDERR )
if (status & NVMCON_LVDERR )
res = ERROR_FLASH_OPERATION_FAILED;
if (res == ERROR_OK)
......
......@@ -182,9 +182,9 @@ static int stm32x_erase_options(struct flash_bank_s *bank)
status = stm32x_wait_status_busy(bank, 10);
if ( status & FLASH_WRPRTERR )
if (status & FLASH_WRPRTERR )
return ERROR_FLASH_OPERATION_FAILED;
if ( status & FLASH_PGERR )
if (status & FLASH_PGERR )
return ERROR_FLASH_OPERATION_FAILED;
/* clear readout protection and complementary option bytes
......@@ -218,9 +218,9 @@ static int stm32x_write_options(struct flash_bank_s *bank)
status = stm32x_wait_status_busy(bank, 10);
if ( status & FLASH_WRPRTERR )
if (status & FLASH_WRPRTERR )
return ERROR_FLASH_OPERATION_FAILED;
if ( status & FLASH_PGERR )
if (status & FLASH_PGERR )
return ERROR_FLASH_OPERATION_FAILED;
/* write protection byte 1 */
......@@ -228,9 +228,9 @@ static int stm32x_write_options(struct flash_bank_s *bank)
status = stm32x_wait_status_busy(bank, 10);
if ( status & FLASH_WRPRTERR )
if (status & FLASH_WRPRTERR )
return ERROR_FLASH_OPERATION_FAILED;
if ( status & FLASH_PGERR )
if (status & FLASH_PGERR )
return ERROR_FLASH_OPERATION_FAILED;
/* write protection byte 2 */
......@@ -238,9 +238,9 @@ static int stm32x_write_options(struct flash_bank_s *bank)
status = stm32x_wait_status_busy(bank, 10);
if ( status & FLASH_WRPRTERR )
if (status & FLASH_WRPRTERR )
return ERROR_FLASH_OPERATION_FAILED;
if ( status & FLASH_PGERR )
if (status & FLASH_PGERR )
return ERROR_FLASH_OPERATION_FAILED;
/* write protection byte 3 */
......@@ -248,9 +248,9 @@ static int stm32x_write_options(struct flash_bank_s *bank)
status = stm32x_wait_status_busy(bank, 10);
if ( status & FLASH_WRPRTERR )
if (status & FLASH_WRPRTERR )
return ERROR_FLASH_OPERATION_FAILED;
if ( status & FLASH_PGERR )
if (status & FLASH_PGERR )
return ERROR_FLASH_OPERATION_FAILED;
/* write protection byte 4 */
......@@ -258,9 +258,9 @@ static int stm32x_write_options(struct flash_bank_s *bank)
status = stm32x_wait_status_busy(bank, 10);
if ( status & FLASH_WRPRTERR )
if (status & FLASH_WRPRTERR )
return ERROR_FLASH_OPERATION_FAILED;
if ( status & FLASH_PGERR )
if (status & FLASH_PGERR )
return ERROR_FLASH_OPERATION_FAILED;
/* write readout protection bit */
......@@ -268,9 +268,9 @@ static int stm32x_write_options(struct flash_bank_s *bank)
status = stm32x_wait_status_busy(bank, 10);
if ( status & FLASH_WRPRTERR )
if (status & FLASH_WRPRTERR )
return ERROR_FLASH_OPERATION_FAILED;
if ( status & FLASH_PGERR )
if (status & FLASH_PGERR )
return ERROR_FLASH_OPERATION_FAILED;
target_write_u32(target, STM32_FLASH_CR, FLASH_LOCK);
......@@ -338,7 +338,7 @@ static int stm32x_protect_check(struct flash_bank_s *bank)
{
set = 1;
if ( protection & (1 << i))
if (protection & (1 << i))
set = 0;
for (s = 0; s < stm32x_info->ppage_size; s++)
......@@ -378,9 +378,9 @@ static int stm32x_erase(struct flash_bank_s *bank, int first, int last)
status = stm32x_wait_status_busy(bank, 10);
if ( status & FLASH_WRPRTERR )
if (status & FLASH_WRPRTERR )
return ERROR_FLASH_OPERATION_FAILED;
if ( status & FLASH_PGERR )
if (status & FLASH_PGERR )
return ERROR_FLASH_OPERATION_FAILED;
bank->sectors[i].is_erased = 1;
}
......@@ -445,7 +445,7 @@ static int stm32x_protect(struct flash_bank_s *bank, int set, int first, int las
reg = (i / stm32x_info->ppage_size) / 8;
bit = (i / stm32x_info->ppage_size) - (reg * 8);
if ( set )
if (set )
prot_reg[reg] &= ~(1 << bit);
else
prot_reg[reg] |= (1 << bit);
......@@ -459,7 +459,7 @@ static int stm32x_protect(struct flash_bank_s *bank, int set, int first, int las
reg = (i / stm32x_info->ppage_size) / 8;
bit = (i / stm32x_info->ppage_size) - (reg * 8);
if ( set )
if (set )
prot_reg[reg] &= ~(1 << bit);
else
prot_reg[reg] |= (1 << bit);
......@@ -658,12 +658,12 @@ static int stm32x_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t off
status = stm32x_wait_status_busy(bank, 5);
if ( status & FLASH_WRPRTERR )
if (status & FLASH_WRPRTERR )
{
LOG_ERROR("flash memory not erased before writing");
return ERROR_FLASH_OPERATION_FAILED;
}
if ( status & FLASH_PGERR )
if (status & FLASH_PGERR )
{
LOG_ERROR("flash memory write protected");
return ERROR_FLASH_OPERATION_FAILED;
......@@ -684,12 +684,12 @@ static int stm32x_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t off
status = stm32x_wait_status_busy(bank, 5);
if ( status & FLASH_WRPRTERR )
if (status & FLASH_WRPRTERR )
{
LOG_ERROR("flash memory not erased before writing");
return ERROR_FLASH_OPERATION_FAILED;
}
if ( status & FLASH_PGERR )
if (status & FLASH_PGERR )
{
LOG_ERROR("flash memory write protected");
return ERROR_FLASH_OPERATION_FAILED;
......@@ -720,7 +720,7 @@ static int stm32x_probe(struct flash_bank_s *bank)
/* read stm32 device id register */
target_read_u32(target, 0xE0042000, &device_id);
LOG_INFO( "device id = 0x%08" PRIx32 "", device_id );
LOG_INFO("device id = 0x%08" PRIx32 "", device_id );
/* get flash size from target */
if (target_read_u16(target, 0x1FFFF7E0, &num_pages) != ERROR_OK)
......@@ -740,7 +740,7 @@ static int stm32x_probe(struct flash_bank_s *bank)
if (num_pages == 0xffff)
{
/* number of sectors incorrect on revA */
LOG_WARNING( "STM32 flash size failed, probe inaccurate - assuming 128k flash" );
LOG_WARNING("STM32 flash size failed, probe inaccurate - assuming 128k flash" );
num_pages = 128;
}
}
......@@ -755,7 +755,7 @@ static int stm32x_probe(struct flash_bank_s *bank)
if (num_pages == 0xffff)
{
/* number of sectors incorrect on revA */
LOG_WARNING( "STM32 flash size failed, probe inaccurate - assuming 32k flash" );
LOG_WARNING("STM32 flash size failed, probe inaccurate - assuming 32k flash" );
num_pages = 32;
}
}
......@@ -770,7 +770,7 @@ static int stm32x_probe(struct flash_bank_s *bank)
if (num_pages == 0xffff)
{
/* number of sectors incorrect on revZ */
LOG_WARNING( "STM32 flash size failed, probe inaccurate - assuming 512k flash" );