Browse Source

dsp5680xx - match page erase with mass erase

when last==first==0 then mass erase is executed, it's faster.
the page marking was wrong in this case.

Change-Id: I5c579d59b5c4778cf057cb5986e086abdd4209b2
Signed-off-by: Rodrigo L. Rosa <rodrigorosa.lg@gmail.com>
Reviewed-on: http://openocd.zylin.com/232
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
tags/v0.6.0-rc1
rodrigo_l_rosa 12 years ago
committed by Øyvind Harboe
parent
commit
f80ef64858
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/flash/nor/dsp5680xx_flash.c

+ 2
- 0
src/flash/nor/dsp5680xx_flash.c View File

@@ -198,6 +198,8 @@ static int dsp5680xx_flash_info(struct flash_bank *bank, char *buf, int buf_size
static int dsp5680xx_flash_erase(struct flash_bank * bank, int first, int last){
int retval;
retval = dsp5680xx_f_erase(bank->target, (uint32_t) first, (uint32_t) last);
if ((!(first|last)) || ((first == 0) && (last == (HFM_SECTOR_COUNT-1))))
last = HFM_SECTOR_COUNT-1;
if(retval == ERROR_OK)
for(int i = first;i<=last;i++)
bank->sectors[i].is_erased = 1;


Loading…
Cancel
Save