From: Alexandru Hossu <hossu.alexandru@gmail.com>
To: robh@kernel.org
Cc: krzk+dt@kernel.org, conor+dt@kernel.org,
gregkh@linuxfoundation.org, jollys@xilinx.com,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-staging@lists.linux.dev
Subject: [PATCH] staging: axis-fifo: fix alignment and add DT binding documentation
Date: Wed, 4 Mar 2026 12:08:53 +0100 [thread overview]
Message-ID: <ae0a95f4-8dac-4690-8810-79ad5fee7895@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 171 bytes --]
Add YAML device tree binding documentation for the Xilinx
AXI-Stream FIFO IP core and fix code alignment issue.
Signed-off-by: Alexandru Hossu <hossu.alexandru@gmail.com>
[-- Attachment #2: 0001-staging-axis-fifo-fix-alignment-and-add-DT-binding-d.patch --]
[-- Type: text/plain, Size: 3453 bytes --]
From b94514738af787173717cbfa85637c53084284da Mon Sep 17 00:00:00 2001
From: Alexandru Hossu <hossu.alexandru@gmail.com>
Date: Wed, 4 Mar 2026 12:06:49 +0100
Subject: [PATCH] staging: axis-fifo: fix alignment and add DT binding
documentation
Signed-off-by: Alexandru Hossu <hossu.alexandru@gmail.com>
---
.../bindings/misc/xlnx,axi-fifo-mm-s.yaml | 77 +++++++++++++++++++
drivers/staging/axis-fifo/axis-fifo.c | 5 +-
2 files changed, 81 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml
diff --git a/Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml b/Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml
new file mode 100644
index 000000000..6d1cd651e
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/xlnx,axi-fifo-mm-s.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/misc/xlnx,axi-fifo-mm-s.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Xilinx AXI-Stream FIFO
+
+description: |
+ The Xilinx AXI-Stream FIFO IP core has read and write AXI-Stream FIFOs,
+ the contents of which can be accessed from the AXI4 memory-mapped interface.
+ Currently supports only store-forward mode with a 32-bit AXI4-Lite interface.
+
+maintainers:
+ - Jolly Shah <jollys@xilinx.com>
+
+properties:
+ compatible:
+ enum:
+ - xlnx,axi-fifo-mm-s-4.1
+ - xlnx,axi-fifo-mm-s-4.2
+ - xlnx,axi-fifo-mm-s-4.3
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-names:
+ items:
+ - const: interrupt
+
+ interrupt-parent: true
+
+ xlnx,use-rx-data:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+ description: Set to 1 if RX FIFO is enabled, 0 otherwise.
+
+ xlnx,use-tx-data:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [0, 1]
+ description: Set to 1 if TX FIFO is enabled, 0 otherwise.
+
+ xlnx,rx-fifo-depth:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Depth of RX FIFO in words.
+
+ xlnx,tx-fifo-depth:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Depth of TX FIFO in words.
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - interrupt-names
+ - interrupt-parent
+ - xlnx,use-rx-data
+ - xlnx,use-tx-data
+
+additionalProperties: true
+
+examples:
+ - |
+ axi_fifo_mm_s_0: axi_fifo_mm_s@43c00000 {
+ compatible = "xlnx,axi-fifo-mm-s-4.1";
+ interrupt-names = "interrupt";
+ interrupt-parent = <&intc>;
+ interrupts = <0 29 4>;
+ reg = <0x43c00000 0x10000>;
+ xlnx,use-rx-data = <0x0>;
+ xlnx,use-tx-data = <0x1>;
+ xlnx,rx-fifo-depth = <0x200>;
+ xlnx,tx-fifo-depth = <0x8000>;
+ };
diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index aa90b2719..6ca2bf4d4 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -245,8 +245,11 @@ static ssize_t axis_fifo_write(struct file *f, const char __user *buf,
} else {
mutex_lock(&fifo->write_lock);
+ u32 free_space;
+
+ free_space = ioread32(fifo->base_addr + XLLF_TDFV_OFFSET);
ret = wait_event_interruptible(fifo->write_queue,
- ioread32(fifo->base_addr + XLLF_TDFV_OFFSET) >= words_to_write);
+ free_space >= words_to_write);
if (ret)
goto end_unlock;
}
--
2.43.0
next reply other threads:[~2026-03-04 11:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 11:08 Alexandru Hossu [this message]
2026-03-04 12:30 ` Rob Herring (Arm)
2026-03-04 12:32 ` Krzysztof Kozlowski
2026-03-04 12:46 ` [PATCH v2] dt-bindings: misc: xlnx,axi-fifo-mm-s: fix interrupt-parent property Alexandru Hossu
2026-03-04 12:51 ` Krzysztof Kozlowski
2026-03-04 12:52 ` Krzysztof Kozlowski
2026-03-04 13:16 ` [PATCH] " Alexandru Hossu
2026-03-04 13:22 ` Greg KH
2026-03-04 13:29 ` Conor Dooley
2026-03-04 14:08 ` Krzysztof Kozlowski
2026-03-04 14:22 ` Conor Dooley
2026-03-04 13:24 ` Krzysztof Kozlowski
2026-03-04 13:29 ` Alexandru Hossu
2026-03-04 14:12 ` [PATCH v2] " Dan Carpenter
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=ae0a95f4-8dac-4690-8810-79ad5fee7895@gmail.com \
--to=hossu.alexandru@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jollys@xilinx.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=robh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®