1
2
3 #define GPDIR 0
4 #define GPCFG 4
5 #define GPDAT 8
6
7
8
9
10
11 #define XL_INITN_PORT 1
12 #define XL_INITN_PIN 14
13 #define XL_RDWRN_PORT 1
14 #define XL_RDWRN_PIN 13
15 #define XL_CCLK_PORT 1
16 #define XL_CCLK_PIN 10
17 #define XL_PROGN_PORT 1
18 #define XL_PROGN_PIN 25
19 #define XL_CSIN_PORT 1
20 #define XL_CSIN_PIN 26
21 #define XL_DONE_PORT 1
22 #define XL_DONE_PIN 27
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49 enum wbus {
50 bus_1byte = 1,
51 bus_2byte = 2,
52 };
53
54 #define MAX_WAIT_DONE 10000
55
56 struct gpiobus {
57 int ngpio;
58 void __iomem *r[4];
59 };
60
61 int xl_supported_prog_bus_width(enum wbus bus_bytes);
62
63 void xl_program_b(int32_t i);
64 void xl_rdwr_b(int32_t i);
65 void xl_csi_b(int32_t i);
66
67 int xl_get_init_b(void);
68 int xl_get_done_b(void);
69
70 void xl_shift_cclk(int count);
71 void xl_shift_bytes_out(enum wbus bus_byte, unsigned char *pdata);
72
73 int xl_init_io(void);