diff options
author | olivier Schonken <olivier.schonken@gmail.com> | 2011-08-20 16:31:35 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2011-08-21 19:37:20 +0200 |
commit | 8292b1b5cd537945a631570f9270ed6337d9cadd (patch) | |
tree | 9bb086cda56273e622b8f8399b7a100733642597 /src | |
parent | 0d5a38d82934a5886f8c1352d8ec875d4d865ad5 (diff) | |
download | riscv-openocd-8292b1b5cd537945a631570f9270ed6337d9cadd.zip riscv-openocd-8292b1b5cd537945a631570f9270ed6337d9cadd.tar.gz riscv-openocd-8292b1b5cd537945a631570f9270ed6337d9cadd.tar.bz2 |
Fix Sam3u flash bank 1 issue
Diffstat (limited to 'src')
-rw-r--r-- | src/flash/nor/at91sam3.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c index 40ff3aa..1fe5f62 100644 --- a/src/flash/nor/at91sam3.c +++ b/src/flash/nor/at91sam3.c @@ -1974,6 +1974,7 @@ FLASH_BANK_COMMAND_HANDLER(sam3_flash_bank_command) bank->bank_number = 1; pChip->details.bank[1].pChip = pChip; pChip->details.bank[1].pBank = bank; + break; // at91sam3s series case FLASH_BANK_BASE_S: @@ -2091,8 +2092,8 @@ _sam3_probe(struct flash_bank *bank, int noise) // update the flash bank size for (x = 0 ; x < SAM3_MAX_FLASH_BANKS ; x++) { - if (bank->base == pPrivate->pChip->details.bank[0].base_address) { - bank->size = pPrivate->pChip->details.bank[0].size_bytes; + if (bank->base == pPrivate->pChip->details.bank[x].base_address) { + bank->size = pPrivate->pChip->details.bank[x].size_bytes; break; } } |