[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=VCbcUnf42tK-HV8j=71BXXytxku_0rGjKyhyR3WG4SUw@mail.gmail.com>
Date: Mon, 17 Apr 2023 07:07:28 -0700
From: Doug Anderson <dianders@...omium.org>
To: Mark Brown <broonie@...nel.org>
Cc: Vijaya Krishna Nivarthi <quic_vnivarth@...cinc.com>,
agross@...nel.org, andersson@...nel.org, konrad.dybcio@...aro.org,
robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
cros-qcom-dts-watchers@...omium.org, linux-arm-msm@...r.kernel.org,
linux-spi@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, quic_msavaliy@...cinc.com,
mka@...omium.org, swboyd@...omium.org, quic_vtanuku@...cinc.com
Subject: Re: [PATCH v3 3/3] spi: spi-qcom-qspi: Add DMA mode support
Hi,
On Mon, Apr 17, 2023 at 5:12 AM Mark Brown <broonie@...nel.org> wrote:
>
> On Fri, Apr 14, 2023 at 03:05:58PM -0700, Doug Anderson wrote:
>
> > Having alignment requirements like this doesn't seem like it should be
> > that unusual, though, and that's why it feels like the logic belongs
> > in the SPI core. In fact, it seems like this is _supposed_ to be
> > handled in the SPI core, but it isn't? In "spi.h" I see
> > "dma_alignment" that claims to be exactly what you need. As far as I
> > can tell, though, the core doesn't use this? ...so I'm kinda confused.
> > As far as I can tell this doesn't do anything and thus anyone setting
> > it today is broken?
>
> SPI consumers should only be providing dmaable buffers.
Ah, I think I see.
1. In "struct spi_transfer" the @tx_buf and @rx_buf are documented to
have "dma-safe memory".
2. On ARM64 anyway, I see "ARCH_DMA_MINALIGN" is 128.
So there is no reason to do any special rules to force alignment to
32-bytes because that's already guaranteed. Presumably that means you
can drop a whole pile of code and things will still work fine.
-Doug
Powered by blists - more mailing lists