How do I Enable LPUART's 1 and 2 so I can use them to talk to some peripherals in U-Boot.
I tried enabling the Freescale LPUART support in my defconfig using make menuconfig but now I get compile errors saying that I have undefined references to devfdt_get_addr so i tried enabling fdt_serial and updating my .dts to enable the lpuarts but i am still getting the same build errors with no change.
Hello Zach Ferree,
Please refer to configs/ls1043aqds_lpuart_defconfig
Please define the following in u-boot configuration file.
CONFIG_FSL_LPUART=y
CONFIG_SYS_EXTRA_OPTIONS="LPUART"
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-lpuart"
For dts configuration, please refer to arch/arm/dts/fsl-ls1043a-qds-lpuart.dts
/dts-v1/;
#include "fsl-ls1043a-qds.dtsi"
/ {
chosen {
stdout-path = &lpuart0;
};
};
Thanks,
Yiping
I did what you suggested and I am still getting the following compile time error.
"build/workspace/sources/u-boot-qoriq/drivers/serial/serial_lpuart.c:417: undefined reference to `devfdt_get_addr'"
do you have any sugesstions on how to fix this?
do I need to enable FDT_SERIAL in the defconfig? am I missing a dependency in one of my .conf files?
Hello Zach Ferree,
Which version LSDK are you using now? Would you please send your modified configuration file
to me to do more verification?
Thanks,
Yiping
Yiping,
Unfortunately I am unable to use NOR flash as I am developing a board with only MMC.
Do you think the issue has to do with using UART0 as the serial interface with the SYS_NS16550 driver along side the FSL_LPUART driver?
Do you know if the SYS_NS16550 driver is using the device tree model or the older model?
Thanks,
Zach
Hello Zach,
SYS_NS16550 driver is used , if enable CONFIG_SPL_SERIAL_SUPPORT in the configuration file.
Thanks,
Yiping
Yiping,
I am still having issues compiling with that enabled.
The compiler error I am getting is
"u-boot-qoriq/drivers/serial/serial_lpuart.c:417: undefined reference to `devfdt_get_addr'"
I believe this to be a linker error, do you know how to verify that the compiler is using the correct "built-in.o" files when linking?
devfdt_get_addr is defined in drivers/core/fdtaddr.c and that is always compiled according to drivers/core/Makefile.
Thanks,
Zach
Hello Zach,
Please define the following options in u-boot configuration file.
CONFIG_FSL_LPUART=y
CONFIG_SPL_DM=y
CONFIG_SPL_OF_LIBFDT=y
CONFIG_SPL_OF_CONTROL=y
Thanks,
Yiping
Yiping,
Adding the config items you listed to my configuration caused the following compile time error
"/u-boot-qoriq/env/mmc.c:42: undefined reference to `blk_get_device_by_str'"
taking a look at what file has the definition for blk_get_device_by_str i found that it was disk/part.c
in order to get that compiling into the image i need to define CONFIG_PARTITIONS in my defconfig, the odd part is that it is already in my defconfig and i was able to confirm that it was getting compiled by adding a "#error" right above the definition of blk_get_device_by_str. so there is some issue where it is getting built but the linker is unable to link it.
Any suggestions?
thanks,
Zach
Hello Zach,
Please disable CONFIG_SPL_OF_CONTROL=y in u-boot configuration file.
Thanks,
Yiping
do you have anything else for me to try to get the ability to use the lpuart's while having UART0 as my console?
Thanks,
Zach
Yiping,
I disabled CONFIG_SPL_OF_CONTROL in my u-boot configuration file.
i get an undefined reference error of the following "u-boot-qoriq/drivers/mmc/fsl_esdhc.c:1390: undefined reference to `fdtdec_get_int'"
Taking a look at the Makefile in the lib folder it should be either the CONFIG_FIT or the CONFIG_SPL_OF_CONTROL define that makes fdtdec_common.c get compiled. CONFIG_FIT will do it only if CONFIG_SPL_BUILD is not defined, I do not have CONFIG_SPL_BUILD defined in my defconfig so it should be compiling fdtdec_common.
putting in a #error does cause a compile time error so it is getting compiled but it seems to not be getting linked.
Thanks,
Zach
In this case i am not using lpuart0 as stdout, i am using it to communicate with a peripheral device, does that change anything?