Browse Source

flash: blank check use default_flash_blank_check

Use default_flash_blank_check, this will use the much faster
blank_check_memory handler if supported - 15x quicker on stm32f4.

Otherwise it will fall back to using the slower default_flash_mem_blank_check.

Change-Id: Ia231b3e95468c9e92594dbdbe1fa2d69e1506fc3
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/632
Tested-by: jenkins
tags/v0.6.0-rc1
Spencer Oliver 10 years ago
parent
commit
f9ea791e9b
9 changed files with 8 additions and 15 deletions
  1. +1
    -1
      src/flash/nor/avrf.c
  2. +1
    -1
      src/flash/nor/core.c
  3. +0
    -7
      src/flash/nor/core.h
  4. +1
    -1
      src/flash/nor/em357.c
  5. +1
    -1
      src/flash/nor/fm3.c
  6. +1
    -1
      src/flash/nor/pic32mx.c
  7. +1
    -1
      src/flash/nor/stellaris.c
  8. +1
    -1
      src/flash/nor/stm32f1x.c
  9. +1
    -1
      src/flash/nor/stm32f2x.c

+ 1
- 1
src/flash/nor/avrf.c View File

@@ -479,7 +479,7 @@ struct flash_driver avr_flash = {
.read = default_flash_read,
.probe = avrf_probe,
.auto_probe = avrf_auto_probe,
.erase_check = default_flash_mem_blank_check,
.erase_check = default_flash_blank_check,
.protect_check = avrf_protect_check,
.info = avrf_info,
};

+ 1
- 1
src/flash/nor/core.c View File

@@ -253,7 +253,7 @@ int get_flash_bank_by_addr(struct target *target,
return ERROR_OK;
}

int default_flash_mem_blank_check(struct flash_bank *bank)
static int default_flash_mem_blank_check(struct flash_bank *bank)
{
struct target *target = bank->target;
const int buffer_size = 1024;


+ 0
- 7
src/flash/nor/core.h View File

@@ -152,13 +152,6 @@ int default_flash_read(struct flash_bank *bank,
* @returns ERROR_OK if successful; otherwise, an error code.
*/
int default_flash_blank_check(struct flash_bank *bank);
/**
* Provides a default blank flash memory check. Ensures the contents
* of the given bank have truly been erased.
* @param bank The flash bank.
* @returns ERROR_OK if successful; otherwise, an error code.
*/
int default_flash_mem_blank_check(struct flash_bank *bank);

/**
* Returns the flash bank specified by @a name, which matches the


+ 1
- 1
src/flash/nor/em357.c View File

@@ -914,7 +914,7 @@ struct flash_driver em357_flash = {
.read = default_flash_read,
.probe = em357_probe,
.auto_probe = em357_auto_probe,
.erase_check = default_flash_mem_blank_check,
.erase_check = default_flash_blank_check,
.protect_check = em357_protect_check,
.info = get_em357_info,
};

+ 1
- 1
src/flash/nor/fm3.c View File

@@ -822,6 +822,6 @@ struct flash_driver fm3_flash = {
.write = fm3_write_block,
.probe = fm3_probe,
.auto_probe = fm3_auto_probe,
.erase_check = default_flash_mem_blank_check,
.erase_check = default_flash_blank_check,
.info = fm3_info,
};

+ 1
- 1
src/flash/nor/pic32mx.c View File

@@ -892,7 +892,7 @@ struct flash_driver pic32mx_flash = {
.read = default_flash_read,
.probe = pic32mx_probe,
.auto_probe = pic32mx_auto_probe,
.erase_check = default_flash_mem_blank_check,
.erase_check = default_flash_blank_check,
.protect_check = pic32mx_protect_check,
.info = pic32mx_info,
};

+ 1
- 1
src/flash/nor/stellaris.c View File

@@ -1398,7 +1398,7 @@ struct flash_driver stellaris_flash = {
.read = default_flash_read,
.probe = stellaris_probe,
.auto_probe = stellaris_probe,
.erase_check = default_flash_mem_blank_check,
.erase_check = default_flash_blank_check,
.protect_check = stellaris_protect_check,
.info = get_stellaris_info,
};

+ 1
- 1
src/flash/nor/stm32f1x.c View File

@@ -1569,7 +1569,7 @@ struct flash_driver stm32f1x_flash = {
.read = default_flash_read,
.probe = stm32x_probe,
.auto_probe = stm32x_auto_probe,
.erase_check = default_flash_mem_blank_check,
.erase_check = default_flash_blank_check,
.protect_check = stm32x_protect_check,
.info = get_stm32x_info,
};

+ 1
- 1
src/flash/nor/stm32f2x.c View File

@@ -826,7 +826,7 @@ struct flash_driver stm32f2x_flash = {
.read = default_flash_read,
.probe = stm32x_probe,
.auto_probe = stm32x_auto_probe,
.erase_check = default_flash_mem_blank_check,
.erase_check = default_flash_blank_check,
.protect_check = stm32x_protect_check,
.info = get_stm32x_info,
};

Loading…
Cancel
Save