0001
0002
0003
0004
0005
0006
0007 #ifndef __FSL_DPIO_H
0008 #define __FSL_DPIO_H
0009
0010 struct fsl_mc_io;
0011
0012 int dpio_open(struct fsl_mc_io *mc_io,
0013 u32 cmd_flags,
0014 int dpio_id,
0015 u16 *token);
0016
0017 int dpio_close(struct fsl_mc_io *mc_io,
0018 u32 cmd_flags,
0019 u16 token);
0020
0021
0022
0023
0024
0025
0026
0027
0028 enum dpio_channel_mode {
0029 DPIO_NO_CHANNEL = 0,
0030 DPIO_LOCAL_CHANNEL = 1,
0031 };
0032
0033
0034
0035
0036
0037
0038
0039 struct dpio_cfg {
0040 enum dpio_channel_mode channel_mode;
0041 u8 num_priorities;
0042 };
0043
0044 int dpio_enable(struct fsl_mc_io *mc_io,
0045 u32 cmd_flags,
0046 u16 token);
0047
0048 int dpio_disable(struct fsl_mc_io *mc_io,
0049 u32 cmd_flags,
0050 u16 token);
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064 struct dpio_attr {
0065 int id;
0066 u64 qbman_portal_ce_offset;
0067 u64 qbman_portal_ci_offset;
0068 u16 qbman_portal_id;
0069 enum dpio_channel_mode channel_mode;
0070 u8 num_priorities;
0071 u32 qbman_version;
0072 u32 clk;
0073 };
0074
0075 int dpio_get_attributes(struct fsl_mc_io *mc_io,
0076 u32 cmd_flags,
0077 u16 token,
0078 struct dpio_attr *attr);
0079
0080 int dpio_set_stashing_destination(struct fsl_mc_io *mc_io,
0081 u32 cmd_flags,
0082 u16 token,
0083 u8 dest);
0084
0085 int dpio_get_api_version(struct fsl_mc_io *mc_io,
0086 u32 cmd_flags,
0087 u16 *major_ver,
0088 u16 *minor_ver);
0089
0090 int dpio_reset(struct fsl_mc_io *mc_io,
0091 u32 cmd_flags,
0092 u16 token);
0093
0094 #endif