summaryrefslogtreecommitdiff
path: root/src/flash
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-23 22:36:56 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-23 22:36:56 +0000
commit9af5e445b796f3b4a51d41f9d2eeaf1f5cd78e3b (patch)
tree454f5975d6d44abec57d19aa50f11e773af2273f /src/flash
parent50c086ffb94f199c088f4cc52b7887b668dddf00 (diff)
downloadopenocd+libswd-9af5e445b796f3b4a51d41f9d2eeaf1f5cd78e3b.tar.gz
openocd+libswd-9af5e445b796f3b4a51d41f9d2eeaf1f5cd78e3b.tar.bz2
openocd+libswd-9af5e445b796f3b4a51d41f9d2eeaf1f5cd78e3b.tar.xz
openocd+libswd-9af5e445b796f3b4a51d41f9d2eeaf1f5cd78e3b.zip
- Replace 'switch(' with 'switch ('.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2359 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash')
-rw-r--r--src/flash/cfi.c24
-rw-r--r--src/flash/ecos.c2
-rw-r--r--src/flash/flash.c4
-rw-r--r--src/flash/mflash.c2
-rw-r--r--src/flash/stm32x.c8
5 files changed, 20 insertions, 20 deletions
diff --git a/src/flash/cfi.c b/src/flash/cfi.c
index b14f0e9c..52989074 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 4c903210..e19ac9b0 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 aa3be959..02505b03 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 6400d3b4..8518df19 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 192ee260..dd1c1d8c 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");