From: Frank Li <Frank.Li@nxp.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
imx@lists.linux.dev, Frank Li <Frank.Li@nxp.com>
Subject: [PATCH 3/4] dmaengine: fsl-dpaa2-qdma: Add dpdmai_cmd_open
Date: Wed, 20 Mar 2024 15:39:21 -0400 [thread overview]
Message-ID: <20240320-dpaa2-v1-3-eb56e47c94ec@nxp.com> (raw)
In-Reply-To: <20240320-dpaa2-v1-0-eb56e47c94ec@nxp.com>
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>
---
drivers/dma/fsl-dpaa2-qdma/dpdmai.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/dma/fsl-dpaa2-qdma/dpdmai.c b/drivers/dma/fsl-dpaa2-qdma/dpdmai.c
index 66a3953f0e3b1..610f6231835a8 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);
--
2.34.1
next prev parent reply other threads:[~2024-03-20 19:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 19:39 [PATCH 0/4] dmaengine: fsl-dpaa2-qdma: Update DPDMAI to support MC firmware 10.1x.x Frank Li
2024-03-20 19:39 ` [PATCH 1/4] dmaengine: fsl-dpaa2-qdma: clean up unused macro Frank Li
2024-03-20 19:39 ` [PATCH 2/4] dmaengine: fsl-dpaa2-qdma: Remove unused function dpdmai_create() Frank Li
2024-03-20 19:39 ` Frank Li [this message]
2024-03-20 19:39 ` [PATCH 4/4] dmaengine: fsl-dpaa2-qdma: Update DPDMAI interfaces to version 3 Frank Li
2024-04-07 12:22 ` Vinod Koul
2024-04-07 16:39 ` (subset) [PATCH 0/4] dmaengine: fsl-dpaa2-qdma: Update DPDMAI to support MC firmware 10.1x.x Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240320-dpaa2-v1-3-eb56e47c94ec@nxp.com \
--to=frank.li@nxp.com \
--cc=dmaengine@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.