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: <20150224142557.GH8670@n2100.arm.linux.org.uk>
Date:	Tue, 24 Feb 2015 14:25:57 +0000
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Peter Ujfalusi <peter.ujfalusi@...com>
Cc:	vinod.koul@...el.com, Tony Lindgren <tony@...mide.com>,
	grant.likely@...aro.org, dmaengine@...r.kernel.org,
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
	linux-omap@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	robh+dt@...nel.org, nm@...com
Subject: Re: [PATCH 4/6] dmaengine: omap-dma: Take DMA request number from DT
 if it is available

On Tue, Feb 24, 2015 at 04:21:21PM +0200, Peter Ujfalusi wrote:
> Use the dma-requests property from DT to get the number of DMA requests.
> In case of legacy boot or failure to find the property, use the default
> 127 as number of requests.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@...com>
> ---
>  drivers/dma/omap-dma.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
> index 56c33e93dd24..7def31c919f4 100644
> --- a/drivers/dma/omap-dma.c
> +++ b/drivers/dma/omap-dma.c
> @@ -34,6 +34,7 @@ struct omap_dmadev {
>  	const struct omap_dma_reg *reg_map;
>  	struct omap_system_dma_plat_info *plat;
>  	bool legacy;
> +	unsigned dma_requests;
>  	spinlock_t irq_lock;
>  	uint32_t irq_enable_mask;
>  	struct omap_chan *lch_map[OMAP_SDMA_CHANNELS];
> @@ -1118,7 +1119,15 @@ static int omap_dma_probe(struct platform_device *pdev)
>  
>  	tasklet_init(&od->task, omap_dma_sched, (unsigned long)od);
>  
> -	for (i = 0; i < OMAP_SDMA_REQUESTS; i++) {
> +	if (!pdev->dev.of_node || of_property_read_u32(pdev->dev.of_node,
> +						       "dma-requests",
> +						       &od->dma_requests)) {
> +		dev_info(&pdev->dev,
> +			 "DMA request lines not specified, using 127\n");
> +		od->dma_requests = 127;

What happened to OMAP_SDMA_REQUESTS?

If you're not going to use OMAP_SDMA_REQUESTS, then don't add it.  If
you are going to use it, please also change the dev_info() line to use
that macro too.

Thanks.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
--
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