diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-25 15:58:50 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-25 20:06:40 -0500 |
commit | 962b0a884a4d18326596e0434d813c17d7f688ef (patch) | |
tree | 9bb5436e7c63d782b90884778c6c5b1eeee90ce8 | |
parent | 6fad18fa51392c9847a4e3a95134b2e57155e563 (diff) |
Revert "serial: of-serial: fix up PM ops on no_console_suspend and port type"
This reverts commit 513e438581020334e0345561adeeeaefa36701be.
It's broken :(
Cc: Jingchang Lu <jingchang.lu@freescale.com>
Cc: Joseph Lo <josephl@nvidia.com>
Cc: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/of_serial.c | 53 |
1 files changed, 7 insertions, 46 deletions
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c index fd00e2521584..088907053ea1 100644 --- a/drivers/tty/serial/of_serial.c +++ b/drivers/tty/serial/of_serial.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | #include <linux/console.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
15 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
@@ -249,48 +248,13 @@ static int of_platform_serial_remove(struct platform_device *ofdev) | |||
249 | } | 248 | } |
250 | 249 | ||
251 | #ifdef CONFIG_PM_SLEEP | 250 | #ifdef CONFIG_PM_SLEEP |
252 | #ifdef CONFIG_SERIAL_8250 | ||
253 | static void of_serial_suspend_8250(struct of_serial_info *info) | ||
254 | { | ||
255 | struct uart_8250_port *port8250 = serial8250_get_port(info->line); | ||
256 | struct uart_port *port = &port8250->port; | ||
257 | |||
258 | serial8250_suspend_port(info->line); | ||
259 | if (info->clk && (!uart_console(port) || console_suspend_enabled)) | ||
260 | clk_disable_unprepare(info->clk); | ||
261 | } | ||
262 | |||
263 | static void of_serial_resume_8250(struct of_serial_info *info) | ||
264 | { | ||
265 | struct uart_8250_port *port8250 = serial8250_get_port(info->line); | ||
266 | struct uart_port *port = &port8250->port; | ||
267 | |||
268 | if (info->clk && (!uart_console(port) || console_suspend_enabled)) | ||
269 | clk_prepare_enable(info->clk); | ||
270 | |||
271 | serial8250_resume_port(info->line); | ||
272 | } | ||
273 | #else | ||
274 | static inline void of_serial_suspend_8250(struct of_serial_info *info) | ||
275 | { | ||
276 | } | ||
277 | |||
278 | static inline void of_serial_resume_8250(struct of_serial_info *info) | ||
279 | { | ||
280 | } | ||
281 | #endif | ||
282 | |||
283 | static int of_serial_suspend(struct device *dev) | 251 | static int of_serial_suspend(struct device *dev) |
284 | { | 252 | { |
285 | struct of_serial_info *info = dev_get_drvdata(dev); | 253 | struct of_serial_info *info = dev_get_drvdata(dev); |
286 | 254 | ||
287 | switch(info->type) { | 255 | serial8250_suspend_port(info->line); |
288 | case PORT_8250 ... PORT_MAX_8250: | 256 | if (info->clk) |
289 | of_serial_suspend_8250(info); | 257 | clk_disable_unprepare(info->clk); |
290 | break; | ||
291 | default: | ||
292 | break; | ||
293 | } | ||
294 | 258 | ||
295 | return 0; | 259 | return 0; |
296 | } | 260 | } |
@@ -299,13 +263,10 @@ static int of_serial_resume(struct device *dev) | |||
299 | { | 263 | { |
300 | struct of_serial_info *info = dev_get_drvdata(dev); | 264 | struct of_serial_info *info = dev_get_drvdata(dev); |
301 | 265 | ||
302 | switch(info->type) { | 266 | if (info->clk) |
303 | case PORT_8250 ... PORT_MAX_8250: | 267 | clk_prepare_enable(info->clk); |
304 | of_serial_resume_8250(info); | 268 | |
305 | break; | 269 | serial8250_resume_port(info->line); |
306 | default: | ||
307 | break; | ||
308 | } | ||
309 | 270 | ||
310 | return 0; | 271 | return 0; |
311 | } | 272 | } |