Hello Matthias,

Tom reported:

Since patch
143256b353c4d2ad1cf5e5e63b38410188b35e49
fdt: update bcm283x device tree sources to Linux 5.1-rc6 state

the console no longer shows the initial message, e.g. "U-Boot
2020.01-rc1-00159-g73b6e6ad25-dirty". This leads to a failure in
automated testing.

To find out what is happening I applied the following code change:

diff --git a/drivers/serial/serial_bcm283x_mu.c
b/drivers/serial/serial_bcm283x_mu.c
index bd1d89ec83..395c49c60a 100644
--- a/drivers/serial/serial_bcm283x_mu.c
+++ b/drivers/serial/serial_bcm283x_mu.c
@@ -171,8 +171,11 @@ static int
bcm283x_mu_serial_ofdata_to_platdata(struct udevice *dev)
        fdt_addr_t addr;

        /* Don't spawn the device if it's not muxed */
-       if (!bcm283x_is_serial_muxed())
+       if (!bcm283x_is_serial_muxed()) {
+               sprintf((void *)0x02400000, "muxed4 false\n");
                return -ENODEV;
+       }
+       sprintf((void *)0x02400010, "muxed5 true");

        addr = devfdt_get_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
diff --git a/lib/display_options.c b/lib/display_options.c
index ec16d75e0e..9d44f49731 100644
--- a/lib/display_options.c
+++ b/lib/display_options.c
@@ -45,6 +45,7 @@ int display_options(void)

        display_options_get_banner(true, buf, sizeof(buf));
        printf("%s", buf);
+       sprintf((void *)0x02400009, "disp5options");

        return 0;
 }


And see:

02400000: 6d 75 78 65 64 34 20 66 61 64 69 73 70 35 6f 70    muxed4
fadisp5op
02400010: 6d 75 78 65 64 35 20 74 72 75 65 00 05 07 06 01    muxed5
true.....

bcm283x_mu_serial_ofdata_to_platdata() is obviously called twice.

The first call is in serial_init(). At that time the GPIOs are not
correctly set up to use the serial port. So display_options() fails.
After relocation another call call occurs after the GPIOs are set up and
this call succeeds.

Do you have an idea how to proceed?

Best regards

Heinrich
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to