1 /* Copyright 2000 AG Electronics Ltd. */
2 /* This code is distributed without warranty under the GPL v2 (see COPYING) */
9 typedef struct flash_fn
11 const char *(* identify)(struct flash_device *flash);
12 void *(* ptr)(void *data);
13 int (* erase_all)(void *data);
14 int (* erase)(void *data, unsigned offset, unsigned length);
15 int (* program)(void *data, unsigned offset, const void *source, unsigned length);
16 uint8_t ( *read_byte)(void *data, unsigned offset);
19 typedef struct flash_device
28 struct flash_device *next;
31 int register_flash_device(const flash_fn *fn, char *tag, void *data);
32 flash_device *find_flash_device(const char *tag);
33 int init_flash_amd800(char *tag, unsigned base, unsigned spacing);