]> git.sur5r.net Git - openocd/commitdiff
flash: blank check use default_flash_blank_check
authorSpencer Oliver <spen@spen-soft.co.uk>
Thu, 10 May 2012 09:33:07 +0000 (10:33 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Mon, 14 May 2012 09:38:26 +0000 (09:38 +0000)
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
src/flash/nor/avrf.c
src/flash/nor/core.c
src/flash/nor/core.h
src/flash/nor/em357.c
src/flash/nor/fm3.c
src/flash/nor/pic32mx.c
src/flash/nor/stellaris.c
src/flash/nor/stm32f1x.c
src/flash/nor/stm32f2x.c

index 1dc5f07e1c1124e7b6860b4e87e57144839f3d7e..d436ea9c1b7da183a00f923d2648e93d8080c388 100644 (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,
 };
index b2bbeb7dfa2700a51abea047f39a4b54ae0bfdd9..14aa9755158a59efcfa6ffa793ac1db3b01d9b6b 100644 (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;
index 90f4e61431a805c479be1169f3a638d309276fbd..3b6b2b5f512230e16bfa16361b6f816fc878ab3c 100644 (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
index 7c697f13efa53e33ecfedf7b41d358915d0b1298..412c9def2e39080bbf77e4298c57175f0248dca8 100644 (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,
 };
index 583ba22c4ec1fb7db80710e48cbc50ebd6eccfd1..0c6301d4fcceaf5eb8d379020b2e4903337a6a2c 100644 (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,
 };
index 8cd0fe656ddf03c99740f6332223bcc3a21b7cc0..788a3b919346d9a828c4361be23aef3f6bab19d6 100644 (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,
 };
index b167fb78c5f35f18e71b14308346c61dda6444d5..0bb93693af8c3825edbf861454d04324c3ccd5d4 100644 (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,
 };
index 91f7f1ffeb586c76ad0d5390a0a17ee39999758f..f05a4aaa3f8a4d4df3d2edbd594bc5ccebaa1b6b 100644 (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,
 };
index daa254651e869868c60294be0518204bd5b214b9..c7e050d0d7cf25abdac8dd22609d47e500de9607 100644 (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,
 };