lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ce28c856695f895a1fba8d28c656647eb3f67d2d.camel@gmail.com>
Date: Thu, 28 Mar 2024 07:59:46 +0100
From: Alexander Sverdlin <alexander.sverdlin@...il.com>
To: Vinod Koul <vkoul@...nel.org>, nikita.shubin@...uefel.me
Cc: linux-kernel@...r.kernel.org, dmaengine@...r.kernel.org, Arnd Bergmann
	 <arnd@...db.de>
Subject: Re: [PATCH v9 38/38] dma: cirrus: remove platform code

Hi Vinod!

On Thu, 2024-03-28 at 10:14 +0530, Vinod Koul wrote:
> > From: Nikita Shubin <nikita.shubin@...uefel.me>
> 
> s/dma/dmaengine is subject line
> 
> > 
> > Remove DMA platform header, from now on we use device tree for DMA
> > clients.
> > 
> > Signed-off-by: Nikita Shubin <nikita.shubin@...uefel.me>
> > ---
> >   drivers/dma/ep93xx_dma.c                 |  48 ++++++++++++++-
> >   include/linux/platform_data/dma-ep93xx.h | 100 -------------------------------
> >   2 files changed, 46 insertions(+), 102 deletions(-)
> > 
> > diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c
> > index 17c8e2badee2..43c4241af7f5 100644
> > --- a/drivers/dma/ep93xx_dma.c
> > +++ b/drivers/dma/ep93xx_dma.c

[...]

> > +/*
> > + * ep93xx_dma_chan_direction - returns direction the channel can be used
> > + *
> > + * This function can be used in filter functions to find out whether the
> > + * channel supports given DMA direction. Only M2P channels have such
> > + * limitation, for M2M channels the direction is configurable.
> > + */
> > +static inline enum dma_transfer_direction
> > +ep93xx_dma_chan_direction(struct dma_chan *chan)
> > +{
> > +	if (!ep93xx_dma_chan_is_m2p(chan))
> > +		return DMA_TRANS_NONE;
> > +
> > +	/* even channels are for TX, odd for RX */
> 
> Is this a SW limitation and HW one?

The numbering scheme is defined in HW:
https://cdn.embeddedts.com/resource-attachments/ts-7000_ep9301-ug.pdf

"7.2.2 Internal M2P/P2M Channel Register Map" -> "PPALLOC"

"NOTE: The naming convention used for channels and
ports is as follows - even numbers correspond to transmit
channels/ports and odd numbers correspond to receive
channels/ports."


> > +	return (chan->chan_id % 2 == 0) ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
> > +}

-- 
Alexander Sverdlin.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ