]> git.sur5r.net Git - openocd/blob - src/flash/arm_nandio.h
115a13aaf517d7743feb4214d3d502636ff08f29
[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 /**
8  * The arm_nand_data struct is used for defining NAND I/O operations on an ARM
9  * core.
10  */
11 struct arm_nand_data {
12         /** target is proxy for some ARM core */
13         struct target           *target;
14
15         /** copy_area holds write-to-NAND loop and data to write */
16         struct working_area     *copy_area;
17
18         /** chunk_size == page or ECC unit */
19         unsigned                chunk_size;
20
21         /** data == where to write the data */
22         uint32_t                data;
23
24         /* currently implicit:  data width == 8 bits (not 16) */
25 };
26
27 int arm_nandwrite(struct arm_nand_data *nand, uint8_t *data, int size);
28 int arm_nandread(struct arm_nand_data *nand, uint8_t *data, uint32_t size);
29
30 #endif /* __ARM_NANDIO_H */