cb8df4283e4a82e4ff911a58be6867845ea23f7a
[fw/openocd] / src / flash / arm_nandio.h
1 #ifndef __ARM_NANDIO_H
2 #define  __ARM_NANDIO_H
3
4 #include "nand.h"
5 #include "binarybuffer.h"
6
7 struct arm_nand_data {
8         /* target is proxy for some ARM core */
9         struct target_s         *target;
10
11         /* copy_area holds write-to-NAND loop and data to write */
12         struct working_area     *copy_area;
13
14         /* chunk_size == page or ECC unit */
15         unsigned                chunk_size;
16
17         /* data == where to write the data */
18         uint32_t                data;
19
20         /* currently implicit:  data width == 8 bits (not 16) */
21 };
22
23 int arm_nandwrite(struct arm_nand_data *nand, uint8_t *data, int size);
24
25 #endif  /* __ARM_NANDIO_H */