* GS101 pl330 AxCACHE
@ 2024-04-05 10:05 Tudor Ambarus
0 siblings, 0 replies; only message in thread
From: Tudor Ambarus @ 2024-04-05 10:05 UTC (permalink / raw)
To: Arnd Bergmann, 김재원/JAEWON KIM, Vinod Koul,
dmaengine, bumyong.lee, surendran.k, l.stelmach, m.szyprowski
Cc: linux-arm-kernel, linux-samsung-soc, linux-kernel@vger.kernel.org,
André Draszik, Peter Griffin, William McVicker, kernel-team,
Sam Protsenko, Krzysztof Kozlowski, sugar.zhang, Alim Akhtar,
Sylwester Nawrocki, Chanwoo Choi, jassisinghbrar, Simek, Michal
Hi,
I'm trying to enable the pl330 DMA controller in GS101 and I'm facing
some problems related to AxCACHE. I'm writing this with the hope that
someone (from samsung?) knows a bit more about the pl330 integration and
its AxCACHE use.
For simplicity, let's consider just the DMA_MEM_TO_MEM case for the
moment. With the current upstream pl330 driver I see that the dmatest
module complains with errors like:
[ 6572.661927][ T6358] dmatest: dma0chan0-copy0: dstbuf[0x18e0] not
copied! Expected cf, got 3f
Checked the downstream driver and found a fix:
- desc->rqcfg.scctl = CCTRL0;
- desc->rqcfg.dcctl = CCTRL0;
+ desc->rqcfg.scctl = CCTRL2;
+ desc->rqcfg.dcctl = CCTRL2;
According to CoreLing DMA-330 TRM [1], the {dst,src}_cache_ctrl fields
program the state of AxCACHE.
AMBA AXI and ACE Protocol Specification [2] says that these signals
specify the memory attributes of a request.
- CTRL0 -> AxCACHE[3:0] = 0b0000 (Device non-bufferable)
- CTRL2 -> AxCACHE[3:0] = 0b0010 (Normal Non-cacheable Non-bufferable)
AxCACHE[1] bit is the Modifiable bit. I guess that GS101 can not meet
the requirements of Non-modifiable transactions. But why? Culprit could
be TREX, the non-coherent interconnect, which collects requests from
different masters and sends the request to cache coherent interconnect
and to System-Level Cache. But I can't pin-point the exact restriction
that comes with it. Any hints here are appreciated.
Thanks for reading up to here. Let's consider now the DMA_MEM_TO_DEV and
DMA_DEV_TO_MEM cases. I guess that for simplicity the driver author
chose to always set CCTRL0 for both src and dst regardless of the memory
type, device or normal. This is possible because normal non-cacheable
memory can be accessed by any Manager using a device memory transaction
(see "A4.5 Mismatched memory attributes" section of [2]). This can be
improved however, if we use CTRL0 (thus Device non-bufferable) for DEV,
and CTRL2 (thus Normal Non-cacheable Non-bufferable) for MEM. I tried
this suggestion on GS101 for a MEM to DEV transaction and I get
timeouts. I tried the downstream driver as well. The downstream GS101
device tree defines all the USI nodes without DMA support, I guess the
to/from DEV transactions are not sorted out yet. I enabled the DMA use
for USI in downstream and ITMON complains with "Unsupported transaction
error". Any feedback is welcomed.
Thanks!
ta
[1]
https://documentation-service.arm.com/static/5e8e25befd977155116a5ad9?token=
[2]
https://documentation-service.arm.com/static/602a9df190ee6824a1e02b98?token=
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-05 10:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-05 10:05 GS101 pl330 AxCACHE Tudor Ambarus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox