mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
dm: serial: Add support for of-platdata
When this feature is enabled, we cannot access the device tree to find out which serial device to use. Just use the first serial driver we find. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
7423daa60e
commit
b484b0daef
1 changed files with 7 additions and 1 deletions
|
@ -33,7 +33,13 @@ static void serial_find_console_or_panic(void)
|
|||
struct udevice *dev;
|
||||
int node;
|
||||
|
||||
if (CONFIG_IS_ENABLED(OF_CONTROL) && blob) {
|
||||
if (CONFIG_IS_ENABLED(OF_PLATDATA)) {
|
||||
uclass_first_device(UCLASS_SERIAL, &dev);
|
||||
if (dev) {
|
||||
gd->cur_serial_dev = dev;
|
||||
return;
|
||||
}
|
||||
} else if (CONFIG_IS_ENABLED(OF_CONTROL) && blob) {
|
||||
/* Check for a chosen console */
|
||||
node = fdtdec_get_chosen_node(blob, "stdout-path");
|
||||
if (node < 0) {
|
||||
|
|
Loading…
Reference in a new issue