1
2
3
4
5
6
7 #ifndef __FSL_DPIO_H
8 #define __FSL_DPIO_H
9
10 struct fsl_mc_io;
11
12 int dpio_open(struct fsl_mc_io *mc_io,
13 u32 cmd_flags,
14 int dpio_id,
15 u16 *token);
16
17 int dpio_close(struct fsl_mc_io *mc_io,
18 u32 cmd_flags,
19 u16 token);
20
21
22
23
24
25
26
27
28 enum dpio_channel_mode {
29 DPIO_NO_CHANNEL = 0,
30 DPIO_LOCAL_CHANNEL = 1,
31 };
32
33
34
35
36
37
38
39 struct dpio_cfg {
40 enum dpio_channel_mode channel_mode;
41 u8 num_priorities;
42 };
43
44 int dpio_enable(struct fsl_mc_io *mc_io,
45 u32 cmd_flags,
46 u16 token);
47
48 int dpio_disable(struct fsl_mc_io *mc_io,
49 u32 cmd_flags,
50 u16 token);
51
52
53
54
55
56
57
58
59
60
61
62
63 struct dpio_attr {
64 int id;
65 u64 qbman_portal_ce_offset;
66 u64 qbman_portal_ci_offset;
67 u16 qbman_portal_id;
68 enum dpio_channel_mode channel_mode;
69 u8 num_priorities;
70 u32 qbman_version;
71 };
72
73 int dpio_get_attributes(struct fsl_mc_io *mc_io,
74 u32 cmd_flags,
75 u16 token,
76 struct dpio_attr *attr);
77
78 int dpio_set_stashing_destination(struct fsl_mc_io *mc_io,
79 u32 cmd_flags,
80 u16 token,
81 u8 dest);
82
83 int dpio_get_api_version(struct fsl_mc_io *mc_io,
84 u32 cmd_flags,
85 u16 *major_ver,
86 u16 *minor_ver);
87
88 int dpio_reset(struct fsl_mc_io *mc_io,
89 u32 cmd_flags,
90 u16 token);
91
92 #endif