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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140312173700.GA1996@atomide.com>
Date:	Wed, 12 Mar 2014 10:37:00 -0700
From:	Tony Lindgren <tony@...mide.com>
To:	Peter Ujfalusi <peter.ujfalusi@...com>
Cc:	vinod.koul@...el.com, dan.j.williams@...el.com,
	dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux@....linux.org.uk, linux-omap@...r.kernel.org
Subject: Re: [PATCH] dma: omap-dma: Implement device_slave_caps callback

* Peter Ujfalusi <peter.ujfalusi@...com> [140307 05:39]:
> With the callback implemented omap-dma can provide information to client
> drivers regarding to supported address widths, directions, residue
> granularity, etc.

This may need some testing against linux next with Russell's
omap-dma.c clean-up series merged there. Peter, care to check
if this patch is still valid against linux next?

Regards,

Tony
 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@...com>
> ---
>  drivers/dma/omap-dma.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
> index 64ceca2920b8..b19f04f4390b 100644
> --- a/drivers/dma/omap-dma.c
> +++ b/drivers/dma/omap-dma.c
> @@ -1088,6 +1088,23 @@ static void omap_dma_free(struct omap_dmadev *od)
>  	}
>  }
>  
> +#define OMAP_DMA_BUSWIDTHS	(BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | \
> +				 BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | \
> +				 BIT(DMA_SLAVE_BUSWIDTH_4_BYTES))
> +
> +static int omap_dma_device_slave_caps(struct dma_chan *dchan,
> +				      struct dma_slave_caps *caps)
> +{
> +	caps->src_addr_widths = OMAP_DMA_BUSWIDTHS;
> +	caps->dstn_addr_widths = OMAP_DMA_BUSWIDTHS;
> +	caps->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
> +	caps->cmd_pause = true;
> +	caps->cmd_terminate = true;
> +	caps->residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
> +
> +	return 0;
> +}
> +
>  static int omap_dma_probe(struct platform_device *pdev)
>  {
>  	struct omap_dmadev *od;
> @@ -1118,6 +1135,7 @@ static int omap_dma_probe(struct platform_device *pdev)
>  	od->ddev.device_prep_slave_sg = omap_dma_prep_slave_sg;
>  	od->ddev.device_prep_dma_cyclic = omap_dma_prep_dma_cyclic;
>  	od->ddev.device_control = omap_dma_control;
> +	od->ddev.device_slave_caps = omap_dma_device_slave_caps;
>  	od->ddev.dev = &pdev->dev;
>  	INIT_LIST_HEAD(&od->ddev.channels);
>  	INIT_LIST_HEAD(&od->pending);
> -- 
> 1.9.0
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ