linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: grygorii.strashko@ti.com (Grygorii Strashko)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] serial: imx: Fix suspend / resume.
Date: Tue, 12 Jan 2016 20:41:50 +0200	[thread overview]
Message-ID: <569548EE.8050608@ti.com> (raw)
In-Reply-To: <20160104191014.GN19062@n2100.arm.linux.org.uk>

Hi Russell,

On 01/04/2016 09:10 PM, Russell King - ARM Linux wrote:
> On Mon, Jan 04, 2016 at 07:22:06PM +0100, Martin Fuzzey wrote:
>> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
>> index 016e4be..16a551b 100644
>> --- a/drivers/tty/serial/imx.c
>> +++ b/drivers/tty/serial/imx.c
>> @@ -2071,13 +2071,13 @@ static int imx_serial_port_suspend_noirq(struct device *dev)
>>   	struct imx_port *sport = platform_get_drvdata(pdev);
>>   	int ret;
>>   
>> -	ret = clk_enable(sport->clk_ipg);
>> +	ret = clk_prepare_enable(sport->clk_ipg);
>>   	if (ret)
>>   		return ret;
>>   
>>   	serial_imx_save_context(sport);
>>   
>> -	clk_disable(sport->clk_ipg);
>> +	clk_disable_unprepare(sport->clk_ipg);
> 
> NAK.  If this is _noirq, then it's a context which can't sleep.  Therefore,
> calling functions that do sleep is not permitted.

That's not not exactly correct. At suspend_noirq time only SPI(device's) IRQs are disabled
while syscore (systimers, scheduler, main irq controllers, nonboot cpus) is still active.

-- 
regards,
-grygorii

  reply	other threads:[~2016-01-12 18:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-04 18:22 [PATCH] serial: imx: Fix suspend / resume Martin Fuzzey
2016-01-04 19:10 ` Russell King - ARM Linux
2016-01-12 18:41   ` Grygorii Strashko [this message]
2016-03-29 11:38     ` Dirk

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=569548EE.8050608@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).