mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Adrian Negreanu <adrian.negreanu@nxp.com>,
	Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 02/11] firmware: qemu_fw_cfg: drop duplicate definitions
Date: Thu, 13 Mar 2025 11:17:19 +0100	[thread overview]
Message-ID: <20250313101728.3546902-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250313101728.3546902-1-a.fatoum@pengutronix.de>

These same defines are already in <uapi/linux/qemu_fw_cfg.h>, so let's
not duplicate them in the driver.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/firmware/qemu_fw_cfg.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware/qemu_fw_cfg.c
index 4a48ad91520b..26770da908ce 100644
--- a/drivers/firmware/qemu_fw_cfg.c
+++ b/drivers/firmware/qemu_fw_cfg.c
@@ -28,19 +28,6 @@
 # define FW_CFG_DMA_OFF 0x10
 #endif
 
-/* fw_cfg DMA commands */
-#define FW_CFG_DMA_CTL_ERROR   0x01
-#define FW_CFG_DMA_CTL_READ    0x02
-#define FW_CFG_DMA_CTL_SKIP    0x04
-#define FW_CFG_DMA_CTL_SELECT  0x08
-#define FW_CFG_DMA_CTL_WRITE   0x10
-
-struct fw_cfg_dma {
-	__be32 control;
-	__be32 length;
-	__be64 address;
-} __packed;
-
 /* fw_cfg device i/o register addresses */
 struct fw_cfg {
 	struct resource *iores;
@@ -51,7 +38,7 @@ struct fw_cfg {
 	loff_t next_read_offset;
 	u32 sel;
 	bool is_mmio;
-	struct fw_cfg_dma __iomem *acc_virt;
+	struct fw_cfg_dma_access __iomem *acc_virt;
 	dma_addr_t acc_dma;
 };
 
@@ -172,7 +159,7 @@ static ssize_t fw_cfg_write(struct cdev *cdev, const void *buf, size_t count,
 {
 	struct fw_cfg *fw_cfg = to_fw_cfg(cdev);
 	struct device *dev = cdev->dev;
-	struct fw_cfg_dma __iomem *acc = fw_cfg->acc_virt;
+	struct fw_cfg_dma_access __iomem *acc = fw_cfg->acc_virt;
 	void *dma_buf;
 	dma_addr_t mapping;
 	int ret = 0;
-- 
2.39.5




  parent reply	other threads:[~2025-03-13 10:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13 10:17 [PATCH 00/11] firmware: qemu_fw_cfg: implement file system Ahmad Fatoum
2025-03-13 10:17 ` [PATCH 01/11] video: ramfb: fix frame buffer screen size Ahmad Fatoum
2025-03-13 10:17 ` Ahmad Fatoum [this message]
2025-03-13 10:17 ` [PATCH 03/11] firmware: qemu_fw_cfg: add support for seeking Ahmad Fatoum
2025-03-13 10:17 ` [PATCH 04/11] firmware: qemu_fw_cfg: rename from /dev/fw_cfg0 to /dev/fw_cfg Ahmad Fatoum
2025-03-13 10:17 ` [PATCH 05/11] fs: add qemu_fw_cfg file system Ahmad Fatoum
2025-03-13 10:17 ` [PATCH 06/11] firmware: qemu_fw_cfg: register at device initcall level Ahmad Fatoum
2025-03-13 10:17 ` [PATCH 07/11] video: ramfb: use new qemu fw_cfg FS Ahmad Fatoum
2025-03-13 10:17 ` [PATCH 08/11] libfile: give copy_file a flags parameter Ahmad Fatoum
2025-03-13 10:17 ` [PATCH 09/11] libfile: pass copy_file flags through copy_recursive Ahmad Fatoum
2025-03-13 10:17 ` [PATCH 10/11] libfile: add support for not clobbering files in copy_file Ahmad Fatoum
2025-03-13 10:17 ` [PATCH 11/11] fs: qemu_fw_cfg: support populating environment via QEMU fw_cfg Ahmad Fatoum

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=20250313101728.3546902-3-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=adrian.negreanu@nxp.com \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox