diff options
author | Frank Li <Frank.Li@nxp.com> | 2024-03-20 22:39:21 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2024-04-07 15:22:59 +0300 |
commit | ebf850697a9daa9f59b902ea1e547079d426618b (patch) | |
tree | 4302554bf52bdcb5e86f835849c4aa07ab893cd5 /drivers/dma | |
parent | 26a4d2aedac28640c1fbb3761d940d99eff44488 (diff) | |
download | linux-ebf850697a9daa9f59b902ea1e547079d426618b.tar.xz |
dmaengine: fsl-dpaa2-qdma: Add dpdmai_cmd_open
Introduce the structures dpdmai_cmd_open to maintain consistency within the
API calls of the driver.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20240320-dpaa2-v1-3-eb56e47c94ec@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/fsl-dpaa2-qdma/dpdmai.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/dma/fsl-dpaa2-qdma/dpdmai.c b/drivers/dma/fsl-dpaa2-qdma/dpdmai.c index 66a3953f0e3b..610f6231835a 100644 --- a/drivers/dma/fsl-dpaa2-qdma/dpdmai.c +++ b/drivers/dma/fsl-dpaa2-qdma/dpdmai.c @@ -33,6 +33,10 @@ struct dpdmai_rsp_get_tx_queue { __le32 fqid; }; +struct dpdmai_cmd_open { + __le32 dpdmai_id; +} __packed; + static inline u64 mc_enc(int lsoffset, int width, u64 val) { return (val & MAKE_UMASK64(width)) << lsoffset; @@ -58,16 +62,16 @@ static inline u64 mc_enc(int lsoffset, int width, u64 val) int dpdmai_open(struct fsl_mc_io *mc_io, u32 cmd_flags, int dpdmai_id, u16 *token) { + struct dpdmai_cmd_open *cmd_params; struct fsl_mc_command cmd = { 0 }; - __le64 *cmd_dpdmai_id; int err; /* prepare command */ cmd.header = mc_encode_cmd_header(DPDMAI_CMDID_OPEN, cmd_flags, 0); - cmd_dpdmai_id = cmd.params; - *cmd_dpdmai_id = cpu_to_le32(dpdmai_id); + cmd_params = (struct dpdmai_cmd_open *)&cmd.params; + cmd_params->dpdmai_id = cpu_to_le32(dpdmai_id); /* send command to mc*/ err = mc_send_command(mc_io, &cmd); |