linux/drivers/tty/serial
Yin Kangkai 5933a161ab serial-core: reset the console speed on resume
On some platforms, we need to restore the console speed on resume even
it was not suspended (no_console_suspend), and on others we don't have
to do that.

So don't care about the "console_suspend_enabled" and unconditionally
reset the console speed if it is a console.

This is actually a redo of ba15ab0 (Set proper console speed on resume
if console suspend is disabled) from Deepak Saxena.  I also tried to
investigate more to find out if this change will break others, here is
what I've found out:

commit 891b9dd107
Author: Jason Wang <jason77.wang@gmail.com>
    serial-core: restore termios settings when resume console ports

commit ca2e71aa8c
Author: Jason Wang <jason77.wang@gmail.com>
    serial-core: skip call set_termios/console_start when no_console_suspend

commit 4547be7809
Author: Stanislav Brabec <sbrabec@suse.cz>
    serial-core: resume serial hardware with no_console_suspend

commit ba15ab0e8d
Author: Deepak Saxena <dsaxena@laptop.org>
    Set proper console speed on resume if console suspend is disabled

from ba15ab0, we learned that, even if the console suspend is disabled
(when no_console_suspend is set), we may still need to "reset the port
to the state it was in before we suspended."

Then with 4547be7, this piece of code is removed.

And then Jason Wang added that back in ca2e71a and 891b9dd, to fix
some breakage on OMAP3EVM platform. From ca2e71a we learned that the
"set_termios" things is actually needed by both console is suspended
and not suspended.

That's why I removed the console_suspended_enabled condition, and only
call console_start() when we actually suspeneded it.

I also noticed in this thread:
http://marc.info/?t=129079257100004&r=1&w=2, which talked about on
some platforms, UART HW will be cut power whether or not we set
no_console_suspend, and then on resume it does not work quite well. I
have a similar HW, and this patch fixed this issue, don't know if this
patch also works on their platforms.

[Update: Stanislav tested this patch on Zaurus and reported it improves the
situation. Thanks.]

CC: Greg KH <greg@kroah.com>
CC: Deepak Saxena <dsaxena@laptop.org>
CC: Jason Wang <jason77.wang@gmail.com>
CC: Stanislav Brabec <sbrabec@suse.cz>
CC: Daniel Drake <dsd@laptop.org>
Signed-off-by: Yin Kangkai <kangkai.yin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-03 14:14:00 -08:00
..
cpm_uart tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
jsm tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
8250_accent.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
8250_acorn.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
8250_boca.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
8250_early.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
8250_exar_st16c554.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
8250_fourport.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
8250_gsc.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
8250_hp300.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
8250_hub6.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
8250_mca.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
8250_pci.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
8250_pnp.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
8250.c serial: unbreak billionton CF card 2011-01-22 19:15:01 -08:00
8250.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
21285.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
68328serial.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
68328serial.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
68360serial.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
altera_jtaguart.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
altera_uart.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
amba-pl010.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
amba-pl011.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
apbuart.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
apbuart.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
atmel_serial.c Merge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-01-20 16:39:23 -08:00
bcm63xx_uart.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
bfin_5xx.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
bfin_sport_uart.c tty: serial: bfin_sport_uart: fix signedness error 2011-02-03 11:40:46 -08:00
bfin_sport_uart.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
clps711x.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
crisv10.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
crisv10.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
dz.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
dz.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
icom.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
icom.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
ifx6x60.c serial: ifx6x60: expanded info available from platform data 2011-02-03 11:43:10 -08:00
ifx6x60.h serial: ifx6x60: expanded info available from platform data 2011-02-03 11:43:10 -08:00
imx.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
ioc3_serial.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
ioc4_serial.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
ip22zilog.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
ip22zilog.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
Kconfig tty/serial: fix apbuart build 2011-01-22 19:15:02 -08:00
kgdboc.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
m32r_sio_reg.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
m32r_sio.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
m32r_sio.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
Makefile tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
max3100.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
max3107-aava.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
max3107.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
max3107.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
mcf.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
mfd.c serial: mfd: remove the timeout workaround for A0 2011-02-03 11:40:46 -08:00
mpc52xx_uart.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
mpsc.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
mrst_max3110.c serial: mrst_max3110: make buffer larger 2011-02-03 14:13:17 -08:00
mrst_max3110.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
msm_serial.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
msm_serial.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
mux.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
netx-serial.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
nwpserial.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
of_serial.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
omap-serial.c serial: omap-serial: Enable the UART wake-up bits always 2011-02-03 14:10:22 -08:00
pch_uart.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
pmac_zilog.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
pmac_zilog.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
pnx8xxx_uart.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
pxa.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
s3c24a0.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
s3c2400.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
s3c2410.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
s3c2412.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
s3c2440.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
s3c6400.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
s5pv210.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
sa1100.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
samsung.c Merge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-01-20 16:39:23 -08:00
samsung.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
sb1250-duart.c console: rename acquire/release_console_sem() to console_lock/unlock() 2011-01-26 10:50:06 +10:00
sc26xx.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
serial_core.c serial-core: reset the console speed on resume 2011-02-03 14:14:00 -08:00
serial_cs.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
serial_ks8695.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
serial_lh7a40x.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
serial_txx9.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
sh-sci.c Merge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-01-20 16:39:23 -08:00
sh-sci.h Merge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-01-20 16:39:23 -08:00
sn_console.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
suncore.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
suncore.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
sunhv.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
sunsab.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
sunsab.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
sunsu.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
sunzilog.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
sunzilog.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
timbuart.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
timbuart.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
uartlite.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
ucc_uart.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
vr41xx_siu.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
vt8500_serial.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
zs.c tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00
zs.h tty: move drivers/serial/ to drivers/tty/serial/ 2011-01-13 12:10:18 -08:00