Skip to content

Commit 26a4d2a

Browse files
nxpfranklivinodkoul
authored andcommitted
dmaengine: fsl-dpaa2-qdma: Remove unused function dpdmai_create()
Remove unused function dpdmai_create(); Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20240320-dpaa2-v1-2-eb56e47c94ec@nxp.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 06db9ee commit 26a4d2a

2 files changed

Lines changed: 0 additions & 56 deletions

File tree

drivers/dma/fsl-dpaa2-qdma/dpdmai.c

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
4636
static 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
}
116106
EXPORT_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

drivers/dma/fsl-dpaa2-qdma/dpdmai.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ int dpdmai_open(struct fsl_mc_io *mc_io, u32 cmd_flags,
153153
int dpdmai_id, u16 *token);
154154
int dpdmai_close(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token);
155155
int dpdmai_destroy(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token);
156-
int dpdmai_create(struct fsl_mc_io *mc_io, u32 cmd_flags,
157-
const struct dpdmai_cfg *cfg, u16 *token);
158156
int dpdmai_enable(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token);
159157
int dpdmai_disable(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token);
160158
int dpdmai_reset(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token);

0 commit comments

Comments
 (0)