From 8292b1b5cd537945a631570f9270ed6337d9cadd Mon Sep 17 00:00:00 2001 From: olivier Schonken Date: Sat, 20 Aug 2011 16:31:35 +0200 Subject: [PATCH] Fix Sam3u flash bank 1 issue --- src/flash/nor/at91sam3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c index 40ff3aa0..1fe5f620 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; } } -- 2.39.5