diff options
author | Vabhav Sharma <vabhav.sharma@nxp.com> | 2020-12-09 08:12:04 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-16 22:49:09 +0300 |
commit | 67b2ed024373f830ffe10fd19b2533d093664ec8 (patch) | |
tree | 304db4316a43259cdaa3bea27ecce2f4848d19ad /drivers/serial/serial-uclass.c | |
parent | a59153dfebb065663fef64827e73aa771c683960 (diff) | |
download | u-boot-67b2ed024373f830ffe10fd19b2533d093664ec8.tar.xz |
drivers: serial: probe all uart devices
U-Boot DM model probe only single device at a time
which is enabled and configured using device tree
or platform data method.
PL011 UART IP is SBSA compliant and firmware does the
serial port set-up, initialization and let the kernel use
UART port for sending and receiving characters.
Normally software talk to one serial port time but some
LayerScape platform require all the UART devices enabled
in Linux for various use case.
Adding support to probe all enabled serial devices like SBSA
compliant PL011 UART ports probe and initialization by firmware.
Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Diffstat (limited to 'drivers/serial/serial-uclass.c')
-rw-r--r-- | drivers/serial/serial-uclass.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c index 58a6541d8c..ead0193ad4 100644 --- a/drivers/serial/serial-uclass.c +++ b/drivers/serial/serial-uclass.c @@ -172,6 +172,15 @@ int serial_init(void) /* Called after relocation */ int serial_initialize(void) { + /* Scanning uclass to probe devices */ + if (IS_ENABLED(CONFIG_SERIAL_PROBE_ALL)) { + int ret; + + ret = uclass_probe_all(UCLASS_SERIAL); + if (ret) + return ret; + } + return serial_init(); } |