mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com>
To: Doug Anderson <dianders@chromium.org>
Cc: <agross@kernel.org>, <andersson@kernel.org>,
	<konrad.dybcio@linaro.org>, <broonie@kernel.org>,
	<robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
	<cros-qcom-dts-watchers@chromium.org>,
	<linux-arm-msm@vger.kernel.org>, <linux-spi@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<quic_msavaliy@quicinc.com>, <mka@chromium.org>,
	<swboyd@chromium.org>, <quic_vtanuku@quicinc.com>
Subject: Re: [PATCH v4 5/5] spi: spi-qcom-qspi: Add DMA mode support
Date: Mon, 24 Apr 2023 15:00:49 +0530	[thread overview]
Message-ID: <7af39e18-dafe-b013-5e2d-ea33dd27cf17@quicinc.com> (raw)
In-Reply-To: <CAD=FV=Wt2VWSkSq2FzbtXBrkS06hwizkKMjkgwgKFqAHmcmyNQ@mail.gmail.com>

Hi,

Thank you very much for the review and all the inputs...


On 4/22/2023 1:28 AM, Doug Anderson wrote:
> On Fri, Apr 21, 2023 at 11:21 AM Vijaya Krishna Nivarthi
> <quic_vnivarth@quicinc.com> wrote:
>>>> If we were to have a linked list of descriptors that we can parse and
>>>> free, it would require 2 more fields
>>>>
>>>> this_descriptor_dma - dma address of the current descriptor
>>> Isn't that exactly the same value as "data_address"? Sure,
>>> "data_address" is a u32 and the DMA address is 64-bits, but elsewhere
>>> in the code you already rely on the fact that the upper bits of the
>>> DMA address are 0 when you do:
>>
>> No; data_address is the dma_address mapped to the xfer buffer.
>>
>> This is provided by spi framework and retrieved from sgl.
>>
>> "this_descriptor" would be the dma_address of the current cmd_descriptor.
>>
>> this is returned from dma_pool_alloc()
>>
>> this would be required for freeing.
> Oh! Of course, that's right. So you are correct, you'd need to add
> "this_descriptor_dma", but not the virtual address since that would be
> the same as the address of the structure via the list_node_t. I guess
> I won't insist on using a linked list even though it seems more
> elegant to me. In the very least it should fall back to PIO if the
> array isn't enough and if we need to change it later we always can.
>
> -Doug


Retained the array, addressed all other comments and uploaded v5.

Conditional can_dma() and clearing interrupts in handle_err(), I thought 
were particularly helpful as they were potential problems later.

test script was very useful too.

Thank you.



  reply	other threads:[~2023-04-24  9:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20 13:13 [PATCH v4 0/5] spi: Add DMA mode support to spi-qcom-qspi Vijaya Krishna Nivarthi
2023-04-20 13:13 ` [PATCH v4 1/5] spi: dt-bindings: qcom,spi-qcom-qspi: Add iommus Vijaya Krishna Nivarthi
2023-04-20 13:13 ` [PATCH v4 2/5] arm64: dts: qcom: sc7180: Add stream-id of qspi to iommus Vijaya Krishna Nivarthi
2023-04-20 17:20   ` Doug Anderson
2023-04-20 13:13 ` [PATCH v4 3/5] arm64: dts: qcom: sc7280: " Vijaya Krishna Nivarthi
2023-04-20 17:20   ` Doug Anderson
2023-04-20 13:13 ` [PATCH v4 4/5] arm64: dts: qcom: sdm845: " Vijaya Krishna Nivarthi
2023-04-20 17:20   ` Doug Anderson
2023-04-20 13:13 ` [PATCH v4 5/5] spi: spi-qcom-qspi: Add DMA mode support Vijaya Krishna Nivarthi
2023-04-20 17:19   ` Doug Anderson
2023-04-21 16:57     ` Vijaya Krishna Nivarthi
2023-04-21 17:35       ` Doug Anderson
2023-04-21 18:21         ` Vijaya Krishna Nivarthi
2023-04-21 19:58           ` Doug Anderson
2023-04-24  9:30             ` Vijaya Krishna Nivarthi [this message]
2023-04-20 18:09   ` Doug Anderson

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=7af39e18-dafe-b013-5e2d-ea33dd27cf17@quicinc.com \
    --to=quic_vnivarth@quicinc.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=cros-qcom-dts-watchers@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=quic_msavaliy@quicinc.com \
    --cc=quic_vtanuku@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=swboyd@chromium.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®