From: Dong Aisheng <aisheng.dong@nxp.com>
To: <linux-clk@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <sboyd@codeaurora.org>,
<mturquette@baylibre.com>, <shawnguo@kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <tglx@linutronix.de>,
<aisheng.dong@nxp.com>, <stefan@agner.ch>,
<l.stach@pengutronix.de>, <cyrille.pitchen@atmel.com>,
<manabian@gmail.com>, <anson.huang@nxp.com>
Subject: [PATCH RFC 5/7] clk: use polling way for SYSTEM_SUSPEND state too
Date: Wed, 29 Jun 2016 21:52:13 +0800 [thread overview]
Message-ID: <1467208335-29876-6-git-send-email-aisheng.dong@nxp.com> (raw)
In-Reply-To: <1467208335-29876-1-git-send-email-aisheng.dong@nxp.com>
During SYSTEM_SUSPEND state, the arch irq is disabled and there's
no way to sleep. Using polling for it too.
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
drivers/clk/clk.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 9369dbb71118..5091ec9bd665 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -601,7 +601,8 @@ static void clk_core_unprepare(struct clk_core *core)
__func__, core->name);
break;
}
- if (system_state == SYSTEM_BOOTING)
+ if (system_state == SYSTEM_BOOTING ||
+ system_state == SYSTEM_SUSPEND)
/*
* Busy loop as we can't schedule in
* early boot
@@ -670,7 +671,8 @@ static int clk_core_prepare(struct clk_core *core)
ret = -ETIMEDOUT;
break;
}
- if (system_state == SYSTEM_BOOTING)
+ if (system_state == SYSTEM_BOOTING ||
+ system_state == SYSTEM_SUSPEND)
/*
* Busy loop as we can't
* schedule in early boot
@@ -1256,7 +1258,8 @@ static int __clk_set_parent(struct clk_core *core, struct clk_core *parent,
ret = -ETIMEDOUT;
break;
}
- if (system_state == SYSTEM_BOOTING)
+ if (system_state == SYSTEM_BOOTING ||
+ system_state == SYSTEM_SUSPEND)
/*
* Busy loop as we can't
* schedule in early boot
@@ -1550,7 +1553,8 @@ static void clk_change_rate(struct clk_core *core)
__func__, core->name);
break;
}
- if (system_state == SYSTEM_BOOTING)
+ if (system_state == SYSTEM_BOOTING ||
+ system_state == SYSTEM_SUSPEND)
/*
* Busy loop as we can't
* schedule in early boot
--
1.9.1
next prev parent reply other threads:[~2016-06-29 13:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-29 13:52 [PATCH RFC 0/7] support clk setting during kernel early boot Dong Aisheng
2016-06-29 13:52 ` [PATCH RFC 1/7] clk: add prepare_hw and prepare_done support Dong Aisheng
2016-07-05 19:53 ` Grygorii Strashko
2016-06-29 13:52 ` [PATCH RFC 2/7] clk: add set_rate_hw and set_rate_done Dong Aisheng
2016-06-29 13:52 ` [PATCH RFC 3/7] clk: add set_parent_hw and set_parent_done Dong Aisheng
2016-06-29 13:52 ` [PATCH RFC 4/7] PM: add SYSTEM_SUSPEND system_state Dong Aisheng
2016-06-29 13:52 ` Dong Aisheng [this message]
2016-06-29 13:52 ` [PATCH RFC 6/7] clk: imx: pllv3: convert to prepare_hw and set_rate_hw Dong Aisheng
2016-07-02 20:30 ` Fabio Estevam
2016-06-29 13:52 ` [PATCH RFC 7/7] clk: imx: clk-busy: convert to set_rate_hw and set_parent_hw Dong Aisheng
2016-07-02 1:12 ` [PATCH RFC 0/7] support clk setting during kernel early boot Stephen Boyd
2016-07-02 23:12 ` Stefan Agner
2016-07-03 12:05 ` Fabio Estevam
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=1467208335-29876-6-git-send-email-aisheng.dong@nxp.com \
--to=aisheng.dong@nxp.com \
--cc=anson.huang@nxp.com \
--cc=cyrille.pitchen@atmel.com \
--cc=l.stach@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manabian@gmail.com \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.org \
--cc=shawnguo@kernel.org \
--cc=stefan@agner.ch \
--cc=tglx@linutronix.de \
/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).