mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 15:37:23 +00:00
725cf89512
At the moment, the U-Boot serial_msm driver does not initialize the UART_DM_DMEN register with the required value. Usually this does not cause any problems, because there is Qualcomm's LK bootloader running before U-Boot which initializes the register with the correct value. It's important that this register is initialized correctly, because the U-Boot driver does not make use of the BAM/DMA or single character mode functionality of the UART controller. A different bootloader before U-Boot might initialize the register differently. For example, on DragonBoard 410c U-Boot can also be installed to the "aboot" partition (replacing LK entirely). In this case U-Boot is loaded directly by SBL, which seems to use the single-character mode for some reason. In single character mode there is always just one char in the FIFO, instead of the 4 characters expected by msm_serial_fetch(). It also causes issues with "earlycon" later in the Linux kernel, which tries to output 4 chars at once, but only the first char will be written. This causes early UART log in Linux to be corrupted like this: [ 00ano:ameoi .Q1B[ 00ac _idaM00080oo'ahani-lcle._20). 15NdNii 5 SPMSJ20:U2 [ 00rkoolmsamel [ 00Fw ]elamletopsioble [ 00ore instead of [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd030] [ 0.000000] Machine model: Qualcomm Technologies, Inc. APQ 8016 SBC [ 0.000000] earlycon: msm_serial_dm0 at MMIO 0x00000000078b0000 (options '') [ 0.000000] printk: bootconsole [msm_serial_dm0] enabled Make sure to initialize UART_DM_DMEN correctly to fix this issue when loading U-Boot directly after SBL (instead of through LK). There is no functional difference when loading U-Boot through LK since LK also initializes UART_DM_DMEN to 0x0. [1] [1]: https://git.linaro.org/landing-teams/working/qualcomm/lk.git/tree/platform/msm_shared/uart_dm.c?h=dragonboard410c-LA.BR.1.2.7-03810-8x16.0-linaro3#n203 Cc: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> |
||
---|---|---|
.. | ||
altera_jtag_uart.c | ||
altera_uart.c | ||
arm_dcc.c | ||
atmel_usart.c | ||
atmel_usart.h | ||
Kconfig | ||
lpc32xx_hsuart.c | ||
Makefile | ||
ns16550.c | ||
sandbox.c | ||
serial-uclass.c | ||
serial.c | ||
serial_ar933x.c | ||
serial_arc.c | ||
serial_bcm283x_mu.c | ||
serial_bcm283x_pl011.c | ||
serial_bcm6345.c | ||
serial_coreboot.c | ||
serial_cortina.c | ||
serial_efi.c | ||
serial_intel_mid.c | ||
serial_linflexuart.c | ||
serial_lpuart.c | ||
serial_mcf.c | ||
serial_meson.c | ||
serial_mpc8xx.c | ||
serial_msm.c | ||
serial_mt7620.c | ||
serial_mtk.c | ||
serial_mvebu_a3700.c | ||
serial_mxc.c | ||
serial_ns16550.c | ||
serial_nulldev.c | ||
serial_octeon_bootcmd.c | ||
serial_octeon_pcie_console.c | ||
serial_omap.c | ||
serial_owl.c | ||
serial_pic32.c | ||
serial_pl01x.c | ||
serial_pl01x_internal.h | ||
serial_pxa.c | ||
serial_rockchip.c | ||
serial_s5p.c | ||
serial_sh.c | ||
serial_sh.h | ||
serial_sifive.c | ||
serial_sti_asc.c | ||
serial_stm32.c | ||
serial_stm32.h | ||
serial_uniphier.c | ||
serial_xen.c | ||
serial_xuartlite.c | ||
serial_zynq.c | ||
usbtty.c | ||
usbtty.h |