aboutsummaryrefslogtreecommitdiff
path: root/src/flash
diff options
context:
space:
mode:
authorPer Ekman <pekenator@gmail.com>2013-10-24 13:55:58 +0200
committerSpencer Oliver <spen@spen-soft.co.uk>2013-11-08 15:09:13 +0000
commitb5d7889f5146515b33a01ac11ab7786eedf08b10 (patch)
tree3a7b25f3d928243bcce055143006614599fb95ee /src/flash
parent88e9d0f4087a95febd9a3fcd65e65f1d478afb6b (diff)
kinetis : Add flash read support to the kinetis nor flash driver.
The default_flash_read() function seems to work ok. Change-Id: Ia34c4642405f669ff63310fa8c641098b771a401 Signed-off-by: Per Ekman <pekenator@gmail.com> Reviewed-on: http://openocd.zylin.com/1763 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/flash')
-rw-r--r--src/flash/nor/kinetis.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/flash/nor/kinetis.c b/src/flash/nor/kinetis.c
index 59750db0..84cf8313 100644
--- a/src/flash/nor/kinetis.c
+++ b/src/flash/nor/kinetis.c
@@ -1051,26 +1051,13 @@ static int kinetis_blank_check(struct flash_bank *bank)
return ERROR_OK;
}
-static int kinetis_flash_read(struct flash_bank *bank,
- uint8_t *buffer, uint32_t offset, uint32_t count)
-{
- LOG_WARNING("kinetis_flash_read not supported yet");
-
- if (bank->target->state != TARGET_HALTED) {
- LOG_ERROR("Target not halted");
- return ERROR_TARGET_NOT_HALTED;
- }
-
- return ERROR_FLASH_OPERATION_FAILED;
-}
-
struct flash_driver kinetis_flash = {
.name = "kinetis",
.flash_bank_command = kinetis_flash_bank_command,
.erase = kinetis_erase,
.protect = kinetis_protect,
.write = kinetis_write,
- .read = kinetis_flash_read,
+ .read = default_flash_read,
.probe = kinetis_probe,
.auto_probe = kinetis_auto_probe,
.erase_check = kinetis_blank_check,