/* * cfi_flash * */ #ifndef __CFI_FLASH_H__ #define __CFI_FLASH_H__ #ifdef __cplusplus extern "C" { #endif #include struct cfi_flash { const char *name; unsigned int flash_id; unsigned int size; unsigned int sector_count; unsigned long *start; }; struct cfi_flash_operations { int (*init)(struct cfi_flash *); int (*erase)(struct cfi_flash *, int sector); int (*write)(struct cfi_flash *, unsigned int off, const void *buf, int len); }; int cfi_flash_make_current(const char *name, struct cfi_flash_operations *xop); int cfi_flash_erase(unsigned int off, int size); int cfi_flash_write(unsigned int off, const void *buf, int size); #ifdef __cplusplus } #endif #endif /* __CFI_FLASH_H__ */