@@ -33,16 +33,6 @@ struct dpdmai_rsp_get_tx_queue {
3333 __le32 fqid ;
3434};
3535
36- #define MC_CMD_OP (_cmd , _param , _offset , _width , _type , _arg ) \
37- ((_cmd).params[_param] |= mc_enc((_offset), (_width), _arg))
38-
39- /* cmd, param, offset, width, type, arg_name */
40- #define DPDMAI_CMD_CREATE (cmd , cfg ) \
41- do { \
42- MC_CMD_OP(cmd, 0, 8, 8, u8, (cfg)->priorities[0]);\
43- MC_CMD_OP(cmd, 0, 16, 8, u8, (cfg)->priorities[1]);\
44- } while (0)
45-
4636static inline u64 mc_enc (int lsoffset , int width , u64 val )
4737{
4838 return (val & MAKE_UMASK64 (width )) << lsoffset ;
@@ -115,50 +105,6 @@ int dpdmai_close(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token)
115105}
116106EXPORT_SYMBOL_GPL (dpdmai_close );
117107
118- /**
119- * dpdmai_create() - Create the DPDMAI object
120- * @mc_io: Pointer to MC portal's I/O object
121- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
122- * @cfg: Configuration structure
123- * @token: Returned token; use in subsequent API calls
124- *
125- * Create the DPDMAI object, allocate required resources and
126- * perform required initialization.
127- *
128- * The object can be created either by declaring it in the
129- * DPL file, or by calling this function.
130- *
131- * This function returns a unique authentication token,
132- * associated with the specific object ID and the specific MC
133- * portal; this token must be used in all subsequent calls to
134- * this specific object. For objects that are created using the
135- * DPL file, call dpdmai_open() function to get an authentication
136- * token first.
137- *
138- * Return: '0' on Success; Error code otherwise.
139- */
140- int dpdmai_create (struct fsl_mc_io * mc_io , u32 cmd_flags ,
141- const struct dpdmai_cfg * cfg , u16 * token )
142- {
143- struct fsl_mc_command cmd = { 0 };
144- int err ;
145-
146- /* prepare command */
147- cmd .header = mc_encode_cmd_header (DPDMAI_CMDID_CREATE ,
148- cmd_flags , 0 );
149- DPDMAI_CMD_CREATE (cmd , cfg );
150-
151- /* send command to mc*/
152- err = mc_send_command (mc_io , & cmd );
153- if (err )
154- return err ;
155-
156- /* retrieve response parameters */
157- * token = mc_cmd_hdr_read_token (& cmd );
158-
159- return 0 ;
160- }
161-
162108/**
163109 * dpdmai_destroy() - Destroy the DPDMAI object and release all its resources.
164110 * @mc_io: Pointer to MC portal's I/O object
0 commit comments