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: <1342764141.1726.199.camel@vkoul-udesk3>
Date:	Fri, 20 Jul 2012 11:32:21 +0530
From:	Vinod Koul <vinod.koul@...ux.intel.com>
To:	Laxman Dewangan <ldewangan@...dia.com>
Cc:	dan.j.williams@...el.com, linux-kernel@...r.kernel.org,
	swarren@...dia.com, linux-tegra@...r.kernel.org
Subject: Re: [PATCH] dma: tegra: enable/disable dma clock

On Wed, 2012-07-18 at 14:26 +0530, Laxman Dewangan wrote:
> Enable the DMA clock when registering DMA driver and
> disable clock when removing the DMA driver.
> 
> The failure was observed on Tegra20 based system by
> Stephen Warren. However, it is working fine on tegra30
> based system and probably becasue uboot enable the clock
> on Tegra30.
Don't know much about the clock subsystem, but shouldn't the clocks be
enabled runtime..... when you actually start using the controller??
> 
> Signed-off-by: Laxman Dewangan <ldewangan@...dia.com>
> Reported-by: Stephen Warren <swarren@...dotorg.org>
> ---
>  drivers/dma/tegra20-apb-dma.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
> index d52dbc6..ccfdaf4 100644
> --- a/drivers/dma/tegra20-apb-dma.c
> +++ b/drivers/dma/tegra20-apb-dma.c
> @@ -1255,6 +1255,12 @@ static int __devinit tegra_dma_probe(struct platform_device *pdev)
>  		}
>  	}
>  
> +	ret = clk_prepare_enable(tdma->dma_clk);
> +	if (ret < 0) {
> +		dev_err(&pdev->dev, "clk_prepare_enable failed: %d\n", ret);
> +		goto err_pm_disable;
> +	}
> +
>  	/* Reset DMA controller */
>  	tegra_periph_reset_assert(tdma->dma_clk);
>  	udelay(2);
> @@ -1363,6 +1369,7 @@ static int __devexit tegra_dma_remove(struct platform_device *pdev)
>  	if (!pm_runtime_status_suspended(&pdev->dev))
>  		tegra_dma_runtime_suspend(&pdev->dev);
>  
> +	clk_disable_unprepare(tdma->dma_clk);
>  	return 0;
>  }
>  


-- 
~Vinod

--
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