From: Jelly Jia <Jelly.Jia@cixtech.com>
To: Frank Li <Frank.li@oss.nxp.com>
Cc: vkoul@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, robin.murphy@arm.com,
devicetree@vger.kernel.org, Frank.Li@kernel.org,
cix-kernel-upstream@cixtech.com, dmaengine@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 2/5] dmaengine: arm-dma350: Add slave and cyclic transfer support
Date: Mon, 16 Nov 2026 18:05:33 +0800 [thread overview]
Message-ID: <avrVbV6FEB8qVstM@ubuntu> (raw)
In-Reply-To: <avYixCLEChNjAvtK@lizhi-Precision-Tower-5810>
Hi Frank,
Thanks for the review.
> Use seperate patch to fix existing problem.
> use new patch for memcpy and memset change.
I'll separate the existing fixes and preparatory changes from the new
slave/cyclic support. The revised DMA series will contain ten patches:
1. Source-trigger bit fix.
2. DMA mask setup error handling.
3. Channel coherency initialization.
4. IRQ, error-state, termination and resource-release lifecycle fixes.
5. Submitted-descriptor status reporting fix.
6. Managed DMA device registration.
7. Explicit descriptor length bookkeeping for memcpy/memset.
8. Slave SG and cyclic support, including managed OF DMA registration.
9. CIX Sky1 binding.
10. Integration clock/reset support.
I'll keep the IRQ/termination changes together so the descriptor lifetime
and channel-state transitions can be reviewed as a whole. The coherency
initialization also affects existing memcpy/memset, so it will be a
separate fix.
> can you use enum/define/struct to avoid hardcode
> convert direct at d350_fill_slave_cmd(), most likely cpu_to_le32() do
> nothingh, to avoid additional data copy
> feel like, needn't save length informaiton, you can get such informaiton
> from cmds
I'll name the command fields, fill the pool commands directly while
preserving the existing little-endian format, and derive SG lengths from
the saved command fields instead of keeping cmd_len[]. I'll also use
scoped guard and the d350_device_config()/d350_device_caps() names.
> Suppose should update it after other field ready. and need dma_wmb() to
> make sure other cmd already written to memory.
> Needn't do memory barrier here, suppose there are issue_transfer() have
> register write, writel() will do that.
The header is a register-update bitmap, not an OWN/VALID flag (TRM 5.7.1).
These are newly prepared commands, fully built before submission; we do
not update an active chain. The first command is loaded through MMIO and
the channel starts with a non-relaxed writel(CH_CMD_ENABLE, ...).
I'll remove the prep-time dma_wmb() and rely on that final writel() for
ordering, without adding a separate header-publication barrier. The
command refactoring will preserve CPU-endian values for MMIO loading.
> Generally, access peripheral register space needn't map, does your hardware
> go through iommu when dma engine access register FIFO?
>
> If yes, I think it should map at set_config to avoid map it every time
> at prepare sg.
There is no IOMMU on this DMA path. However, Sky1's RCSU remaps peripheral
addresses, so the DMA bus address differs from the CPU physical address.
The dma-ranges property describes this, and dma_map_resource() performs
the translation through the direct DMA path.
I'd retain descriptor-owned mappings rather than move them into config,
so their lifetime stays tied to queued/reusable descriptors rather than
subsequent configuration updates. This maps once per descriptor, not once
per SG entry.
> why previous check CH_STAT_INTR_DONE, here use CH_STAT_DONE, suppose it
> is w1c register?
Yes. In CH_STATUS, INTR_DONE/ERR (bits 0/1) are read-only, while
STAT_DONE/ERR (bits 16/17) are W1C. Clearing STAT also clears the matching
INTR flag (TRM 6.5.1.2, Table 6-8). I'll retain that distinction and clarify
it in the patch. ERRINFO is read before clearing STAT_ERR, since clearing
STAT_ERR also clears ERRINFO.
Best regards,
Jelly
next prev parent reply other threads:[~2026-11-16 10:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 1:34 [PATCH v6 0/5] dmaengine: arm-dma350: Add slave support and Sky1 integration Jelly Jia
2026-11-06 1:34 ` [PATCH v6 1/5] dmaengine: arm-dma350: Fix source trigger bit Jelly Jia
2026-11-06 1:34 ` [PATCH v6 2/5] dmaengine: arm-dma350: Add slave and cyclic transfer support Jelly Jia
2026-11-12 20:34 ` Frank Li
2026-11-16 10:05 ` Jelly Jia [this message]
2026-11-06 1:34 ` [PATCH v6 3/5] dt-bindings: dma: arm,dma-350: Describe the CIX Sky1 integration Jelly Jia
2026-11-06 8:33 ` Krzysztof Kozlowski
2026-11-12 19:45 ` Frank Li
2026-11-06 1:34 ` [PATCH v6 4/5] dmaengine: arm-dma350: Support integration clocks and resets Jelly Jia
2026-11-12 20:35 ` Frank Li
2026-11-16 10:06 ` Jelly Jia
2026-11-06 1:34 ` [PATCH v6 5/5] arm64: dts: cix: Describe the Sky1 FCH DMA-350 integration Jelly Jia
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=avrVbV6FEB8qVstM@ubuntu \
--to=jelly.jia@cixtech.com \
--cc=Frank.Li@kernel.org \
--cc=Frank.li@oss.nxp.com \
--cc=cix-kernel-upstream@cixtech.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=robin.murphy@arm.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox