summaryrefslogtreecommitdiff
path: root/src/flash/nor/imp.h
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2010-05-11 11:16:33 +0800
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-05-16 13:39:47 +0200
commitbc8be110ff314cab0e09792a05b6871672c18302 (patch)
tree4b7d6fe290465142848a4e9d17c808f9564fafc8 /src/flash/nor/imp.h
parent24ebfffff54f5201f1503256df56717900e65e2d (diff)
downloadopenocd+libswd-bc8be110ff314cab0e09792a05b6871672c18302.tar.gz
openocd+libswd-bc8be110ff314cab0e09792a05b6871672c18302.tar.bz2
openocd+libswd-bc8be110ff314cab0e09792a05b6871672c18302.tar.xz
openocd+libswd-bc8be110ff314cab0e09792a05b6871672c18302.zip
NOR: add read() callback to struct flash_driver
Final target is to force bus_width size during CFI flash read. In this first step I need to replace default flash read with flash specific implementation. This patch introduces: - flash_driver_read() layer; - default_flash_read(), backward compatible; - read() callback in struct flash_driver; - proper initialization in every flash_driver instance. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src/flash/nor/imp.h')
-rw-r--r--src/flash/nor/imp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/flash/nor/imp.h b/src/flash/nor/imp.h
index 34ccbe4e..de1bc9e5 100644
--- a/src/flash/nor/imp.h
+++ b/src/flash/nor/imp.h
@@ -40,6 +40,8 @@ int flash_driver_erase(struct flash_bank *bank, int first, int last);
int flash_driver_protect(struct flash_bank *bank, int set, int first, int last);
int flash_driver_write(struct flash_bank *bank,
uint8_t *buffer, uint32_t offset, uint32_t count);
+int flash_driver_read(struct flash_bank *bank,
+ uint8_t *buffer, uint32_t offset, uint32_t count);
/* write (optional verify) an image to flash memory of the given target */
int flash_write_unlock(struct target *target, struct image *image,