mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Folker Schwesinger" <dev@folker-schwesinger.de>
To: "Pandey, Radhey Shyam" <radhey.shyam.pandey@amd.com>,
	"Thomas Gessler" <thomas.gessler@brueckmann-gmbh.de>,
	"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>
Cc: "Vinod Koul" <vkoul@kernel.org>,
	"Simek, Michal" <michal.simek@amd.com>,
	"Marek Vasut" <marex@denx.de>,
	"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Katakam, Harini" <harini.katakam@amd.com>,
	"Gupta, Suraj" <Suraj.Gupta2@amd.com>
Subject: Re: [PATCH] dmaengine: xilinx_dma: Set dma_device directions
Date: Wed, 07 May 2025 10:47:08 +0000	[thread overview]
Message-ID: <D9PVA78TMQNH.H3AZTEVZ8SV@folker-schwesinger.de> (raw)
In-Reply-To: <MN0PR12MB5953C8800220724906360D54B788A@MN0PR12MB5953.namprd12.prod.outlook.com>

On Wed May 7, 2025 at 12:20 PM CEST, Radhey Shyam Pandey wrote:
> [snip]
>> > Subject: [PATCH] dmaengine: xilinx_dma: Set dma_device directions
>> >
>> > Coalesce the direction bits from the enabled TX and/or RX channels
>> > into the directions bit mask of dma_device. Without this mask set,
>> > dma_get_slave_caps() in the DMAEngine fails, which prevents the driver
>> > from being used with an IIO DMAEngine buffer.
>> >
>> > Signed-off-by: Thomas Gessler <thomas.gessler@brueckmann-gmbh.de>
>>
>> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
>> Thanks!
>>
>> > ---
>> >  drivers/dma/xilinx/xilinx_dma.c | 4 ++++
>> >  1 file changed, 4 insertions(+)
>> >
>> > diff --git a/drivers/dma/xilinx/xilinx_dma.c
>> > b/drivers/dma/xilinx/xilinx_dma.c index 108a7287f4cd..641aaf0c0f1c
>> > 100644
>> > --- a/drivers/dma/xilinx/xilinx_dma.c
>> > +++ b/drivers/dma/xilinx/xilinx_dma.c
>> > @@ -3205,6 +3205,10 @@ static int xilinx_dma_probe(struct
>> > platform_device
>> > *pdev)
>> >             }
>> >     }
>> >
>> > +   for (i = 0; i < xdev->dma_config->max_channels; i++)
>> > +           if (xdev->chan[i])
>> > +                   xdev->common.directions |= xdev->chan[i]->direction;
>> > +
>
> Suraj also worked on this patch internally and he did set direction in chan_probe().
> So, I think we can switch to below implementation ?
>
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -2909,6 +2909,7 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
>                 return -EINVAL;
>         }
>
> +       xdev->common.directions |= chan->direction;

Looks good to me.


  reply	other threads:[~2025-05-07 11:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-14 13:48 Thomas Gessler
2025-03-14 15:09 ` Folker Schwesinger
2025-03-17  6:48 ` Pandey, Radhey Shyam
2025-05-07 10:20   ` Pandey, Radhey Shyam
2025-05-07 10:47     ` Folker Schwesinger [this message]
2025-05-07 10:59     ` Geßler, Thomas
2025-05-07 11:02       ` Pandey, Radhey Shyam

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=D9PVA78TMQNH.H3AZTEVZ8SV@folker-schwesinger.de \
    --to=dev@folker-schwesinger.de \
    --cc=Suraj.Gupta2@amd.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=harini.katakam@amd.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=michal.simek@amd.com \
    --cc=radhey.shyam.pandey@amd.com \
    --cc=thomas.gessler@brueckmann-gmbh.de \
    --cc=u.kleine-koenig@baylibre.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

all inboxes | Powered by JetHome®