public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: b.brezillon@overkiz•com (boris brezillon)
To: linux-arm-kernel@lists•infradead.org
Subject: [RFC PATCH 27/50] at_hdmac: prepare clk before calling enable
Date: Wed, 12 Jun 2013 14:08:43 +0200	[thread overview]
Message-ID: <51B864CB.8000100@overkiz.com> (raw)
In-Reply-To: <20130612090520.GN4107@intel.com>

On 12/06/2013 11:05, Vinod Koul wrote:
> On Fri, Jun 07, 2013 at 06:25:57PM +0200, Boris BREZILLON wrote:
>> Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to
>> avoid common clk framework warnings.
>>
>> Signed-off-by: Boris BREZILLON <b.brezillon@overkiz•com>
>> ---
>>   drivers/dma/at_hdmac.c |   12 ++++++------
>>   1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
>> index e923cda..4772036 100644
>> --- a/drivers/dma/at_hdmac.c
>> +++ b/drivers/dma/at_hdmac.c
>> @@ -1374,7 +1374,7 @@ static int __init at_dma_probe(struct platform_device *pdev)
>>   		err = PTR_ERR(atdma->clk);
>>   		goto err_clk;
>>   	}
>> -	clk_enable(atdma->clk);
>> +	clk_prepare_enable(atdma->clk);
> Can you add checks for return value in the driver as well
Sure. I'll add it in the next version.
>>   
>>   	/* force dma off, just in case */
>>   	at_dma_off(atdma);
>> @@ -1475,7 +1475,7 @@ err_pool_create:
>>   	platform_set_drvdata(pdev, NULL);
>>   	free_irq(platform_get_irq(pdev, 0), atdma);
>>   err_irq:
>> -	clk_disable(atdma->clk);
>> +	clk_disable_unprepare(atdma->clk);
>>   	clk_put(atdma->clk);
>>   err_clk:
>>   	iounmap(atdma->regs);
>> @@ -1512,7 +1512,7 @@ static int at_dma_remove(struct platform_device *pdev)
>>   		list_del(&chan->device_node);
>>   	}
>>   
>> -	clk_disable(atdma->clk);
>> +	clk_disable_unprepare(atdma->clk);
>>   	clk_put(atdma->clk);
>>   
>>   	iounmap(atdma->regs);
>> @@ -1531,7 +1531,7 @@ static void at_dma_shutdown(struct platform_device *pdev)
>>   	struct at_dma	*atdma = platform_get_drvdata(pdev);
>>   
>>   	at_dma_off(platform_get_drvdata(pdev));
>> -	clk_disable(atdma->clk);
>> +	clk_disable_unprepare(atdma->clk);
>>   }
>>   
>>   static int at_dma_prepare(struct device *dev)
>> @@ -1588,7 +1588,7 @@ static int at_dma_suspend_noirq(struct device *dev)
>>   
>>   	/* disable DMA controller */
>>   	at_dma_off(atdma);
>> -	clk_disable(atdma->clk);
>> +	clk_disable_unprepare(atdma->clk);
>>   	return 0;
>>   }
>>   
>> @@ -1618,7 +1618,7 @@ static int at_dma_resume_noirq(struct device *dev)
>>   	struct dma_chan *chan, *_chan;
>>   
>>   	/* bring back DMA controller */
>> -	clk_enable(atdma->clk);
>> +	clk_prepare_enable(atdma->clk);
>>   	dma_writel(atdma, EN, AT_DMA_ENABLE);
>>   
>>   	/* clear any pending interrupt */
> --
> ~Vinod

  reply	other threads:[~2013-06-12 12:08 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-07 14:24 [RESEND RFC PATCH 00/50] ARM: at91: move to common clk framework Boris BREZILLON
2013-06-07 14:24 ` [RFC PATCH 01/50] ARM: at91: move at91_pmc.h to include/linux/clk/at91.h Boris BREZILLON
2013-06-07 14:24 ` [RFC PATCH 02/50] ARM: at91: add PMC main clock Boris BREZILLON
2013-06-07 15:30   ` Thomas Petazzoni
2013-06-07 15:36     ` boris brezillon
2013-06-07 14:24 ` [RFC PATCH 03/50] ARM: at91: add PMC pll clocks Boris BREZILLON
2013-06-07 14:24 ` [RFC PATCH 04/50] ARM: at91: add PMC master clock Boris BREZILLON
2013-06-07 14:24 ` [RFC PATCH 05/50] ARM: at91: add PMC system clocks Boris BREZILLON
2013-06-07 14:24 ` [RFC PATCH 06/50] ARM: at91: add PMC peripheral clocks Boris BREZILLON
2013-06-07 14:24 ` [RFC PATCH 07/50] ARM: at91: add PMC programmable clocks Boris BREZILLON
2013-06-07 14:24 ` [RFC PATCH 08/50] ARM: at91: add PMC utmi clock Boris BREZILLON
2013-06-07 14:24 ` [RFC PATCH 09/50] ARM: at91: add PMC usb clock Boris BREZILLON
2013-06-07 14:24 ` [RFC PATCH 10/50] ARM: at91: add PMC smd clock Boris BREZILLON
2013-06-07 14:24 ` [RFC PATCH 11/50] ARM: at91: add PMC clk device tree binding doc Boris BREZILLON
2013-06-07 15:08 ` [RFC PATCH 12/50] ARM: at91: move to common clk framework Boris BREZILLON
2013-06-07 15:11 ` [RFC PATCH 13/50] ARM: at91: move at91rm9200 SoC to new at91 clk implem Boris BREZILLON
2013-06-20  6:52   ` Mike Turquette
2013-06-20  7:12     ` boris brezillon
2013-06-07 15:11 ` [RFC PATCH 14/50] ARM: at91: move at91sam9260 " Boris BREZILLON
2013-06-07 15:19 ` [RFC PATCH 15/50] ARM: at91: move at91sam9261 " Boris BREZILLON
2013-06-07 15:20 ` [RFC PATCH 16/50] ARM: at91: move at91sam9263 " Boris BREZILLON
2013-06-07 15:24 ` [RFC PATCH 17/50] ARM: at91: move at91sam9g45 " Boris BREZILLON
2013-06-07 15:25 ` [RFC PATCH 18/50] ARM: at91: move at91sam9n12 " Boris BREZILLON
2013-06-07 15:28 ` [RFC PATCH 19/50] ARM: at91: move at91sam9rl " Boris BREZILLON
2013-06-07 15:30 ` [RFC PATCH 20/50] ARM: at91: move at91sam9x5 SoCs " Boris BREZILLON
2013-06-07 15:36 ` [RFC PATCH 21/50] ARM: at91: move at91sam9 " Boris BREZILLON
2013-06-07 15:37 ` [RFC PATCH 22/50] ARM: at91: move sama5d3 " Boris BREZILLON
2013-06-07 15:42 ` [RFC PATCH 23/50] ARM: at91: move at91rm9200 boards " Boris BREZILLON
2013-06-07 16:23 ` [RFC PATCH 24/50] ARM: at91: move at91sam9 " Boris BREZILLON
2013-06-07 16:23 ` [RFC PATCH 25/50] ARM: at91: move pit timer to common clk framework Boris BREZILLON
2013-06-07 16:24 ` [RFC PATCH 26/50] ARM: at91/tc/clocksource: replace clk_enable/disable with clk_prepare_enable/disable_unprepare Boris BREZILLON
2013-06-07 16:25 ` [RFC PATCH 27/50] at_hdmac: prepare clk before calling enable Boris BREZILLON
2013-06-12  9:05   ` Vinod Koul
2013-06-12 12:08     ` boris brezillon [this message]
2013-06-07 16:26 ` [RFC PATCH 28/50] ASoC: atmel-ssc: " Boris BREZILLON
2013-06-07 16:55   ` Mark Brown
2013-06-07 19:56     ` Boris BREZILLON
2013-06-10  9:06       ` Mark Brown
2013-06-10  9:28         ` boris brezillon
2013-06-07 16:26 ` [RFC PATCH 29/50] mmc: atmel-mci: " Boris BREZILLON
2013-06-07 16:26 ` [RFC PATCH 30/50] pwm: atmel-tcb: " Boris BREZILLON
2013-06-12 10:52   ` Thierry Reding
2013-06-07 18:07 ` [RFC PATCH 31/50] tty: atmel_serial: " Boris BREZILLON
2013-06-07 18:08 ` [RFC PATCH 32/50] usb: gadget: at91_udc: " Boris BREZILLON
2013-06-12 15:06   ` Felipe Balbi
2013-06-07 18:08 ` [RFC PATCH 33/50] ehci-atmel.c: " Boris BREZILLON
2013-06-07 18:08 ` [RFC PATCH 34/50] USB: ohci-at91: " Boris BREZILLON
2013-06-07 18:08 ` [RFC PATCH 35/50] at91/avr32/atmel_lcdfb: " Boris BREZILLON
2013-06-07 18:09 ` [RFC PATCH 36/50] ARM: at91/dt: move at91rm9200 SoC to new at91 clk implem Boris BREZILLON
2013-06-07 18:09 ` [RFC PATCH 37/50] ARM: at91/dt: move at91sam9260 " Boris BREZILLON
2013-06-07 18:12 ` [RFC PATCH 38/50] ARM: at91/dt: move at91sam9263 " Boris BREZILLON
2013-06-07 18:12 ` [RFC PATCH 39/50] ARM: at91/dt: move at91sam9g45 " Boris BREZILLON
2013-06-07 18:13 ` [RFC PATCH 40/50] ARM: at91/dt: move at91sam9n12 " Boris BREZILLON
2013-06-07 18:13 ` [RFC PATCH 41/50] ARM: at91/dt: move at91sam9x5 SoCs " Boris BREZILLON
2013-06-07 18:13 ` [RFC PATCH 42/50] ARM: at91/dt: move at91sam9g20 SoC " Boris BREZILLON
2013-06-07 18:14 ` [RFC PATCH 43/50] ARM: at91/dt: move sama5d3 SoCs " Boris BREZILLON
2013-06-07 18:14 ` [RFC PATCH 44/50] ARM: at91/dt: move sam9260/sam9g20 " Boris BREZILLON
2013-06-07 18:14 ` [RFC PATCH 45/50] ARM: at91/dt: move rm9200 boards " Boris BREZILLON
2013-06-07 19:33 ` [RFC PATCH 37/50] ARM: at91/dt: move at91sam9260 SoC " Boris BREZILLON
2013-06-07 19:41 ` [RFC PATCH 46/50] ARM: at91/dt: move sam9263 boards " Boris BREZILLON
2013-06-07 19:42 ` [RFC PATCH 47/50] ARM: at91/dt: move sam9g45 " Boris BREZILLON
2013-06-07 19:43 ` [RFC PATCH 48/50] ARM: at91/dt: move sam9n12 " Boris BREZILLON
2013-06-07 19:44 ` [RFC PATCH 49/50] ARM: at91/dt: move sam9x5 " Boris BREZILLON
2013-06-07 19:45 ` [RFC PATCH 50/50] ARM: at91/dt: move sama5d3 " Boris BREZILLON
2013-06-07 20:00 ` [RFC PATCH 45/50] ARM: at91/dt: move rm9200 " Boris BREZILLON
2013-06-07 20:03 ` [RFC PATCH 37/50] ARM: at91/dt: move at91sam9260 SoC " Boris BREZILLON

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=51B864CB.8000100@overkiz.com \
    --to=b.brezillon@overkiz$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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