aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor/lpc288x.c
diff options
context:
space:
mode:
authorTomas Vanek <vanekt@fbl.cz>2018-11-15 14:50:08 +0100
committerTomas Vanek <vanekt@fbl.cz>2018-12-05 07:55:53 +0000
commit63fcef493ab23e6f00a8e815c4f59688a088d285 (patch)
treeb16f258596e9be5f6f7c073b7a87b7d3182978e9 /src/flash/nor/lpc288x.c
parent42f1cc576ab9b503fadd0b8916a139cd0bc6563e (diff)
downloadriscv-openocd-63fcef493ab23e6f00a8e815c4f59688a088d285.zip
riscv-openocd-63fcef493ab23e6f00a8e815c4f59688a088d285.tar.gz
riscv-openocd-63fcef493ab23e6f00a8e815c4f59688a088d285.tar.bz2
flash/nor: use default_flash_blank_check() instead of dummy
Some flash drivers had a dummy method for erase_check. Use default_flash_blank_check() instead if possible. Change-Id: Iddfeff45ce477007328d061fcb5c553d93c3be98 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4766 Tested-by: jenkins Reviewed-by: Christopher Head <chead@zaber.com>
Diffstat (limited to 'src/flash/nor/lpc288x.c')
-rw-r--r--src/flash/nor/lpc288x.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/flash/nor/lpc288x.c b/src/flash/nor/lpc288x.c
index 474e721..afa8d79 100644
--- a/src/flash/nor/lpc288x.c
+++ b/src/flash/nor/lpc288x.c
@@ -232,17 +232,6 @@ static uint32_t lpc288x_system_ready(struct flash_bank *bank)
return ERROR_OK;
}
-static int lpc288x_erase_check(struct flash_bank *bank)
-{
- uint32_t status = lpc288x_system_ready(bank); /* probed? halted? */
- if (status != ERROR_OK) {
- LOG_INFO("Processor not halted/not probed");
- return status;
- }
-
- return ERROR_OK;
-}
-
static int lpc288x_erase(struct flash_bank *bank, int first, int last)
{
uint32_t status;
@@ -432,7 +421,7 @@ struct flash_driver lpc288x_flash = {
.read = default_flash_read,
.probe = lpc288x_probe,
.auto_probe = lpc288x_probe,
- .erase_check = lpc288x_erase_check,
+ .erase_check = default_flash_blank_check,
.protect_check = lpc288x_protect_check,
.free_driver_priv = default_flash_free_driver_priv,
};