DM_SERIAL is broken for Kirkwood boards

Tony Dinh mibodhi at gmail.com
Fri Jan 27 07:13:45 CET 2023


Hi all,

On Thu, Jan 26, 2023 at 3:38 PM Tony Dinh <mibodhi at gmail.com> wrote:
>
> Hi all,
>
> I ran some tests today (Pogo V4 and NSA310S boards) with the latest
> master branch and saw the same behavior we've seen before. The boards
> hung, and the serial console was silent after kwboot finished
> transferring the u-boot image. I'm running with this DTSI patch below
> (to enable dm-pre-reloc for uart0).
>
> If I deselected DM_SERIAL then both boards booted OK with kwboot.
>
> diff --git a/arch/arm/dts/kirkwood-nsa310s.dts
> b/arch/arm/dts/kirkwood-nsa310s.dts
> index 09ee76c2a2..6c5a991fde 100644
> --- a/arch/arm/dts/kirkwood-nsa310s.dts
> +++ b/arch/arm/dts/kirkwood-nsa310s.dts
> @@ -317,3 +317,8 @@
>  &pcie0 {
>         status = "okay";
>  };
> +
> +&uart0 {
> +        u-boot,dm-pre-reloc;
> +        status = "okay";
> +};
> diff --git a/arch/arm/dts/kirkwood-pogoplug-series-4.dts
> b/arch/arm/dts/kirkwood-pogoplug-series-4.dts
> index 5aa4669ae2..ef495d69f5 100644
> --- a/arch/arm/dts/kirkwood-pogoplug-series-4.dts
> +++ b/arch/arm/dts/kirkwood-pogoplug-series-4.dts
> @@ -98,6 +98,7 @@
>  };
>
>  &uart0 {
> +       u-boot,dm-pre-reloc;
>         status = "okay";
>  };
>
> @Michael, it would be great if you could try with your Buffalo board,
> and see if you will experience the same behavior.

Looks like this commit was the indirect cause of the problem.

Convert CONFIG_SYS_NS16550_MEM32 et al to Kconfig
https://github.com/u-boot/u-boot/commit/9591b63531fa5a34698ee7bb3800af6c4ea6ba2f

-CONFIG_SYS_NS16550=y
+CONFIG_SYS_NS16550_SERIAL=y
+CONFIG_SYS_NS16550_REG_SIZE=-4

Later, when we enabled DM_SERIAL, CONFIG_SYS_NS16550_SERIAL and
CONFIG_SYS_NS16550_REG_SIZE got deselected. But CONFIG_SYS_NS16550 is
needed again. So bring it back and it will work.

diff --git a/configs/pogo_v4_defconfig b/configs/pogo_v4_defconfig
index 3860ad30d3..f98e6cdc6e 100644
--- a/configs/pogo_v4_defconfig
+++ b/configs/pogo_v4_defconfig
@@ -70,8 +70,7 @@ CONFIG_PCI=y
 CONFIG_PCI_MVEBU=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_EMULATION=y
-CONFIG_SYS_NS16550_SERIAL=y
-CONFIG_SYS_NS16550_REG_SIZE=-4
+CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_PCI=y

All the best,
Tony


More information about the U-Boot mailing list