OpenCloudOS-Kernel/drivers/tty/serial/8250
Chen-Yu Tsai c8ed99d4f6 serial: 8250_dw: Add support for deferred probing
The 8250_dw driver fails to probe if the specified clock isn't
registered at probe time. Even if a clock frequency is given,
the required clock might be gated because it wasn't properly
enabled.

This happened to me when the device is registered through DT,
and the clock was part of an MFD, the PRCM found on A31 and A23
SoCs. Unlike core clocks that are registered with OF_CLK_DECLARE,
which happen almost immediately after the kernel starts, the
clocks are registered as sub-devices of the PRCM MFD platform
device. Even though devices are registered in the order they are
found in the DT, the drivers are registered in a different,
arbitrary order. It is possible that the 8250_dw driver is
registered, and thus associated with the device and probed, before
the clock driver is registered and probed.

8250_dw then reports unable to get the clock, and fails. Without
a working console, the kernel panics.

This patch adds support for deferred probe handling for the clock
and reset controller. It also fixes the cleanup path if
serial8250_register_8250_port fails.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:07:08 -07:00
..
8250.h serial/uart/8250: Add tunable RX interrupt trigger I/F of FIFO buffers 2014-07-17 18:23:35 -07:00
8250_accent.c
8250_acorn.c tty: remove use of __devexit 2012-11-21 15:27:46 -08:00
8250_boca.c
8250_core.c serial/uart/8250: Add tunable RX interrupt trigger I/F of FIFO buffers 2014-07-17 18:23:35 -07:00
8250_dma.c serial: 8250_dma: check the result of TX buffer mapping 2014-05-28 13:07:27 -07:00
8250_dw.c serial: 8250_dw: Add support for deferred probing 2014-07-27 11:07:08 -07:00
8250_early.c tty/serial: fix 8250 early console option passing to regular console 2014-06-19 13:07:26 -07:00
8250_em.c tty: delete non-required instances of include <linux/init.h> 2014-01-07 17:05:21 -08:00
8250_exar_st16c554.c
8250_fourport.c
8250_fsl.c serial: 8250: introduce up_to_u8250p() helper 2014-07-17 18:16:23 -07:00
8250_gsc.c parisc: Fix interrupt routing for C8000 serial ports 2013-07-31 23:42:32 +02:00
8250_hp300.c tty: remove use of __devexit 2012-11-21 15:27:46 -08:00
8250_hub6.c
8250_pci.c serial: 8250: introduce up_to_u8250p() helper 2014-07-17 18:16:23 -07:00
8250_pnp.c tty: delete non-required instances of include <linux/init.h> 2014-01-07 17:05:21 -08:00
Kconfig tty/serial: convert 8250 to generic earlycon 2014-04-24 16:32:27 -07:00
Makefile TTY: 8250, revert module name change 2013-03-25 16:26:23 -07:00
serial_cs.c tty: delete non-required instances of include <linux/init.h> 2014-01-07 17:05:21 -08:00