The PBL console is currently broken, as the setup relocates the running code, invalidating the previously computed FDT address. Relocate always to avoid those differences in behavior. Signed-off-by: Lucas Stach <dev@xxxxxxxxxx> --- arch/arm/boards/avnet-zedboard/lowlevel.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/arch/arm/boards/avnet-zedboard/lowlevel.c b/arch/arm/boards/avnet-zedboard/lowlevel.c index 1ecddf24085f..026a03d04be8 100644 --- a/arch/arm/boards/avnet-zedboard/lowlevel.c +++ b/arch/arm/boards/avnet-zedboard/lowlevel.c @@ -276,10 +276,6 @@ static void avnet_zedboard_ps7_init(void) static void avnet_zedboard_pbl_console_init(void) { - relocate_to_current_adr(); - setup_c(); - barrier(); - cadence_uart_init((void *)ZYNQ_UART1_BASE_ADDR); pbl_set_putc(cadence_uart_putc, (void *)ZYNQ_UART1_BASE_ADDR); @@ -288,9 +284,6 @@ static void avnet_zedboard_pbl_console_init(void) ENTRY_FUNCTION_WITHSTACK(start_avnet_zedboard, 0xfffff000, r0, r1, r2) { - - void *fdt = __dtb_z_zynq_zed_start + get_runtime_offset(); - /* MIO_07 in GPIO Mode 3.3V VIO, can be uncomented because it is the default value */ writel(0x0000DF0D, ZYNQ_SLCR_UNLOCK); writel(0x00000600, 0xF800071C ); @@ -305,8 +298,12 @@ ENTRY_FUNCTION_WITHSTACK(start_avnet_zedboard, 0xfffff000, r0, r1, r2) avnet_zedboard_ps7_init(); + relocate_to_current_adr(); + setup_c(); + barrier(); + if (IS_ENABLED(CONFIG_PBL_CONSOLE)) avnet_zedboard_pbl_console_init(); - barebox_arm_entry(0, SZ_512M, fdt); + barebox_arm_entry(0, SZ_512M, __dtb_z_zynq_zed_start); } -- 2.47.1