flash/nor: Allow CFI memory read/write functions be overriden
[fw/openocd] / src / flash / nor / cfi.h
index ed858a9de5772eb2bddbca74a37d6e192dc64976..9451faae640a97052a22b45190b1111a5d928c94 100644 (file)
@@ -73,6 +73,12 @@ struct cfi_flash_bank {
        unsigned buf_write_timeout;
        unsigned block_erase_timeout;
        unsigned chip_erase_timeout;
+
+       /* memory accessors */
+       int (*write_mem)(struct flash_bank *bank, target_addr_t addr,
+                        uint32_t count, const uint8_t *buffer);
+       int (*read_mem)(struct flash_bank *bank, target_addr_t addr,
+                       uint32_t count, uint8_t *buffer);
 };
 
 /* Intel primary extended query table