1ea4603cc8
[ Upstream commit c362272bdea32bf048d6916b0a2dc485eb9cf787 ]
If you've got the "console" serial port setup to use just as a UART
(AKA there is no "console=ttyMSMX" on the kernel command line) then
certain initialization is skipped. When userspace later tries to do
something with the port then things go boom (specifically, on my
system, some sort of exception hit that caused the system to reboot
itself w/ no error messages).
Let's cleanup / refactor the init so that we always run the same init
code regardless of whether we're using the console.
To make this work, we make rely on qcom_geni_serial_pm doing its job
to turn resources on.
For the record, here is a trace of the order of things (after this
patch) when console= is specified on the command line and we have an
agetty on the port:
qcom_geni_serial_pm: 4 (undefined) => 0 (on)
qcom_geni_console_setup
qcom_geni_serial_port_setup
qcom_geni_serial_console_write
qcom_geni_serial_startup
qcom_geni_serial_start_tx
...and here is the order of things (after this patch) when console= is
_NOT_ specified on the command line and we have an agetty port:
qcom_geni_serial_pm: 4 => 0
qcom_geni_serial_pm: 0 => 3
qcom_geni_serial_pm: 3 => 0
qcom_geni_serial_startup
qcom_geni_serial_port_setup
qcom_geni_serial_pm: 0 => 3
qcom_geni_serial_pm: 3 => 0
qcom_geni_serial_startup
qcom_geni_serial_start_tx
Fixes:
|
||
---|---|---|
.. | ||
hvc | ||
ipwireless | ||
serdev | ||
serial | ||
vt | ||
amiserial.c | ||
cyclades.c | ||
ehv_bytechan.c | ||
goldfish.c | ||
isicom.c | ||
Kconfig | ||
Makefile | ||
mips_ejtag_fdc.c | ||
moxa.c | ||
moxa.h | ||
mxser.c | ||
mxser.h | ||
n_gsm.c | ||
n_hdlc.c | ||
n_null.c | ||
n_r3964.c | ||
n_tracerouter.c | ||
n_tracesink.c | ||
n_tracesink.h | ||
n_tty.c | ||
nozomi.c | ||
pty.c | ||
rocket.c | ||
rocket.h | ||
rocket_int.h | ||
synclink.c | ||
synclink_gt.c | ||
synclinkmp.c | ||
sysrq.c | ||
tty_audit.c | ||
tty_baudrate.c | ||
tty_buffer.c | ||
tty_io.c | ||
tty_ioctl.c | ||
tty_jobctrl.c | ||
tty_ldisc.c | ||
tty_ldsem.c | ||
tty_mutex.c | ||
tty_port.c | ||
vcc.c |