summaryrefslogtreecommitdiff
path: root/src/flash/nor/str9xpec.c
diff options
context:
space:
mode:
authorSpencer Oliver <ntfreak@users.sourceforge.net>2010-03-08 20:31:25 +0000
committerSpencer Oliver <ntfreak@users.sourceforge.net>2010-03-10 20:31:59 +0000
commit6344f2ab98cf1fd1f92403de46b6e36b3b122ad5 (patch)
tree3849baba3a8f0e893758deabc36d520130f2888f /src/flash/nor/str9xpec.c
parent2946c895a175e586a7f79797e2168c9fd0eddbbe (diff)
downloadopenocd+libswd-6344f2ab98cf1fd1f92403de46b6e36b3b122ad5.tar.gz
openocd+libswd-6344f2ab98cf1fd1f92403de46b6e36b3b122ad5.tar.bz2
openocd+libswd-6344f2ab98cf1fd1f92403de46b6e36b3b122ad5.tar.xz
openocd+libswd-6344f2ab98cf1fd1f92403de46b6e36b3b122ad5.zip
STR9: flash loader cleanup
- make algorithm array static const. - increase algorithm buffer size to 32k. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Diffstat (limited to 'src/flash/nor/str9xpec.c')
-rw-r--r--src/flash/nor/str9xpec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/flash/nor/str9xpec.c b/src/flash/nor/str9xpec.c
index b6d24f58..35fe806d 100644
--- a/src/flash/nor/str9xpec.c
+++ b/src/flash/nor/str9xpec.c
@@ -551,7 +551,8 @@ static int str9xpec_set_address(struct flash_bank *bank, uint8_t sector)
return ERROR_OK;
}
-static int str9xpec_write(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
+static int str9xpec_write(struct flash_bank *bank, uint8_t *buffer,
+ uint32_t offset, uint32_t count)
{
struct str9xpec_flash_controller *str9xpec_info = bank->driver_priv;
uint32_t dwords_remaining = (count / 8);
@@ -619,7 +620,8 @@ static int str9xpec_write(struct flash_bank *bank, uint8_t *buffer, uint32_t off
{
str9xpec_set_address(bank, str9xpec_info->sector_bits[i]);
- dwords_remaining = dwords_remaining < (bank->sectors[i].size/8) ? dwords_remaining : (bank->sectors[i].size/8);
+ dwords_remaining = dwords_remaining < (bank->sectors[i].size/8)
+ ? dwords_remaining : (bank->sectors[i].size/8);
while (dwords_remaining > 0)
{
@@ -1226,6 +1228,7 @@ static const struct command_registration str9xpec_config_command_handlers[] = {
},
COMMAND_REGISTRATION_DONE
};
+
static const struct command_registration str9xpec_command_handlers[] = {
{
.name = "str9xpec",