STR9: flash loader cleanup

- make algorithm array static const.
 - increase algorithm buffer size to 32k.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
This commit is contained in:
Spencer Oliver
2010-03-08 20:31:25 +00:00
parent 2946c895a1
commit 6344f2ab98
2 changed files with 19 additions and 8 deletions

View File

@@ -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",