lkml.org 
[lkml]   [2016]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH RFC 5/7] clk: use polling way for SYSTEM_SUSPEND state too
Date
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
\
 
 \ /
  Last update: 2016-06-29 16:41    [W:0.228 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site