diff options
Diffstat (limited to 'src/flash')
-rw-r--r-- | src/flash/cfi.c | 24 | ||||
-rw-r--r-- | src/flash/ecos.c | 2 | ||||
-rw-r--r-- | src/flash/flash.c | 4 | ||||
-rw-r--r-- | src/flash/mflash.c | 2 | ||||
-rw-r--r-- | src/flash/stm32x.c | 8 |
5 files changed, 20 insertions, 20 deletions
diff --git a/src/flash/cfi.c b/src/flash/cfi.c index b14f0e9..5298907 100644 --- a/src/flash/cfi.c +++ b/src/flash/cfi.c @@ -806,7 +806,7 @@ static int cfi_erase(struct flash_bank_s *bank, int first, int last) if (cfi_info->qry[0] != 'Q') return ERROR_FLASH_BANK_NOT_PROBED; - switch(cfi_info->pri_id) + switch (cfi_info->pri_id) { case 1: case 3: @@ -958,7 +958,7 @@ static int cfi_protect(struct flash_bank_s *bank, int set, int first, int last) if (cfi_info->qry[0] != 'Q') return ERROR_FLASH_BANK_NOT_PROBED; - switch(cfi_info->pri_id) + switch (cfi_info->pri_id) { case 1: case 3: @@ -1601,7 +1601,7 @@ static int cfi_intel_write_words(struct flash_bank_s *bank, uint8_t *word, uint3 bank->base, address, cfi_info->max_buf_write_size); return ERROR_FLASH_OPERATION_FAILED; } - switch(bank->chip_width) + switch (bank->chip_width) { case 4 : bufferwsize = buffersize / 4; break; case 2 : bufferwsize = buffersize / 2; break; @@ -1740,7 +1740,7 @@ static int cfi_spansion_write_words(struct flash_bank_s *bank, uint8_t *word, ui LOG_ERROR("Write address at base 0x%" PRIx32 ", address %" PRIx32 " not aligned to 2^%d boundary", bank->base, address, cfi_info->max_buf_write_size); return ERROR_FLASH_OPERATION_FAILED; } - switch(bank->chip_width) + switch (bank->chip_width) { case 4 : bufferwsize = buffersize / 4; break; case 2 : bufferwsize = buffersize / 2; break; @@ -1817,7 +1817,7 @@ static int cfi_write_word(struct flash_bank_s *bank, uint8_t *word, uint32_t add { cfi_flash_bank_t *cfi_info = bank->driver_priv; - switch(cfi_info->pri_id) + switch (cfi_info->pri_id) { case 1: case 3: @@ -1838,7 +1838,7 @@ static int cfi_write_words(struct flash_bank_s *bank, uint8_t *word, uint32_t wo { cfi_flash_bank_t *cfi_info = bank->driver_priv; - switch(cfi_info->pri_id) + switch (cfi_info->pri_id) { case 1: case 3: @@ -1927,7 +1927,7 @@ int cfi_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset, uint3 /* handle blocks of bus_size aligned bytes */ blk_count = count & ~(bank->bus_width - 1); /* round down, leave tail bytes */ - switch(cfi_info->pri_id) + switch (cfi_info->pri_id) { /* try block writes (fails without working area) */ case 1: @@ -1958,7 +1958,7 @@ int cfi_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset, uint3 uint32_t buffermask = buffersize-1; uint32_t bufferwsize; - switch(bank->chip_width) + switch (bank->chip_width) { case 4 : bufferwsize = buffersize / 4; break; case 2 : bufferwsize = buffersize / 2; break; @@ -2293,7 +2293,7 @@ static int cfi_probe(struct flash_bank_s *bank) /* We need to read the primary algorithm extended query table before calculating * the sector layout to be able to apply fixups */ - switch(cfi_info->pri_id) + switch (cfi_info->pri_id) { /* Intel command set (standard and extended) */ case 0x0001: @@ -2326,7 +2326,7 @@ static int cfi_probe(struct flash_bank_s *bank) } /* end CFI case */ /* apply fixups depending on the primary command set */ - switch(cfi_info->pri_id) + switch (cfi_info->pri_id) { /* Intel command set (standard and extended) */ case 0x0001: @@ -2490,7 +2490,7 @@ static int cfi_protect_check(struct flash_bank_s *bank) if (cfi_info->qry[0] != 'Q') return ERROR_FLASH_BANK_NOT_PROBED; - switch(cfi_info->pri_id) + switch (cfi_info->pri_id) { case 1: case 3: @@ -2567,7 +2567,7 @@ static int cfi_info(struct flash_bank_s *bank, char *buf, int buf_size) buf += printed; buf_size -= printed; - switch(cfi_info->pri_id) + switch (cfi_info->pri_id) { case 1: case 3: diff --git a/src/flash/ecos.c b/src/flash/ecos.c index 4c90321..e19ac9b 100644 --- a/src/flash/ecos.c +++ b/src/flash/ecos.c @@ -392,7 +392,7 @@ static void command(flash_bank_t *bank, uint8_t cmd, uint8_t *cmd_buf) static uint32_t ecosflash_address(struct flash_bank_s *bank, uint32_t address) { uint32_t retval = 0; - switch(bank->bus_width) + switch (bank->bus_width) { case 4: retval = address & 0xfffffffc; diff --git a/src/flash/flash.c b/src/flash/flash.c index aa3be95..02505b0 100644 --- a/src/flash/flash.c +++ b/src/flash/flash.c @@ -751,7 +751,7 @@ static int handle_flash_fill_command(struct command_context_s *cmd_ctx, char *cm if (count == 0) return ERROR_OK; - switch(cmd[4]) + switch (cmd[4]) { case 'w': wordsize=4; @@ -767,7 +767,7 @@ static int handle_flash_fill_command(struct command_context_s *cmd_ctx, char *cm } chunk_count = MIN(count, (1024 / wordsize)); - switch(wordsize) + switch (wordsize) { case 4: for(i = 0; i < chunk_count; i++) diff --git a/src/flash/mflash.c b/src/flash/mflash.c index 6400d3b..8518df1 100644 --- a/src/flash/mflash.c +++ b/src/flash/mflash.c @@ -232,7 +232,7 @@ static int mg_dsk_wait(mg_io_type_wait wait, uint32_t time) if (wait == mg_io_wait_bsy) return ERROR_OK; } else { - switch(wait) + switch (wait) { case mg_io_wait_not_bsy: return ERROR_OK; diff --git a/src/flash/stm32x.c b/src/flash/stm32x.c index 192ee26..dd1c1d8 100644 --- a/src/flash/stm32x.c +++ b/src/flash/stm32x.c @@ -848,7 +848,7 @@ static int stm32x_info(struct flash_bank_s *bank, char *buf, int buf_size) buf += printed; buf_size -= printed; - switch(device_id >> 16) + switch (device_id >> 16) { case 0x0000: snprintf(buf, buf_size, "A"); @@ -877,7 +877,7 @@ static int stm32x_info(struct flash_bank_s *bank, char *buf, int buf_size) buf += printed; buf_size -= printed; - switch(device_id >> 16) + switch (device_id >> 16) { case 0x1000: snprintf(buf, buf_size, "A"); @@ -894,7 +894,7 @@ static int stm32x_info(struct flash_bank_s *bank, char *buf, int buf_size) buf += printed; buf_size -= printed; - switch(device_id >> 16) + switch (device_id >> 16) { case 0x1000: snprintf(buf, buf_size, "A"); @@ -915,7 +915,7 @@ static int stm32x_info(struct flash_bank_s *bank, char *buf, int buf_size) buf += printed; buf_size -= printed; - switch(device_id >> 16) + switch (device_id >> 16) { case 0x1000: snprintf(buf, buf_size, "A"); |