Flash driver for em357
[fw/openocd] / src / flash / nor / lpc288x.c
index 5ab4e9ccef98a796370eabb63977228156567405..589527f735c060f60ecfe12a1872c451b93c10b6 100644 (file)
@@ -32,7 +32,6 @@
 #endif
 
 #include "imp.h"
-#include "lpc288x.h"
 #include <helper/binarybuffer.h>
 
 
 /* F_CLK_TIME */
 #define FCT_CLK_DIV_MASK    0x0FFF
 
+struct lpc288x_flash_bank
+{
+       uint32_t working_area;
+       uint32_t working_area_size;
+
+       /* chip id register */
+       uint32_t cidr;
+       const char * target_name;
+       uint32_t cclk;
+
+       uint32_t sector_size_break;
+};
+
 static uint32_t lpc288x_wait_status_busy(struct flash_bank *bank, int timeout);
 static void lpc288x_load_timer(int erase, struct target *target);
 static void lpc288x_set_flash_clk(struct flash_bank *bank);
@@ -478,6 +490,7 @@ struct flash_driver lpc288x_flash = {
        .erase = lpc288x_erase,
        .protect = lpc288x_protect,
        .write = lpc288x_write,
+       .read = default_flash_read,
        .probe = lpc288x_probe,
        .auto_probe = lpc288x_probe,
        .erase_check = lpc288x_erase_check,