
The serial clock is provided by the get_serial_clock() callback on PPC under DM_SERIAL. Use the same method to compute the clock as for non-DM_SERIAL use cases.
Signed-off-by: Camelia Groza camelia.groza@nxp.com --- board/freescale/t102xrdb/t102xrdb.c | 10 +++++++++- include/configs/T102xRDB.h | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c index ffc4c1122d83..73f9d3ac72e7 100644 --- a/board/freescale/t102xrdb/t102xrdb.c +++ b/board/freescale/t102xrdb/t102xrdb.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2014 Freescale Semiconductor, Inc. - * Copyright 2020 NXP + * Copyright 2020-2023 NXP */
#include <common.h> @@ -20,6 +20,7 @@ #include <asm/fsl_law.h> #include <asm/fsl_serdes.h> #include <asm/fsl_liodn.h> +#include <clock_legacy.h> #include <fm_eth.h> #include "t102xrdb.h" #ifdef CONFIG_TARGET_T1024RDB @@ -45,6 +46,13 @@ enum { }; #endif
+#if CONFIG_IS_ENABLED(DM_SERIAL) +int get_serial_clock(void) +{ + return get_bus_freq(0) / 2; +} +#endif + int checkboard(void) { struct cpu_type *cpu = gd->arch.cpu; diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h index 7ee46abffdb6..284291af2fab 100644 --- a/include/configs/T102xRDB.h +++ b/include/configs/T102xRDB.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright 2014 Freescale Semiconductor, Inc. - * Copyright 2020-2021 NXP + * Copyright 2020-2023 NXP */
/* @@ -283,7 +283,9 @@ #define CFG_SYS_INIT_SP_OFFSET (CFG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
/* Serial Port */ +#if !CONFIG_IS_ENABLED(DM_SERIAL) #define CFG_SYS_NS16550_CLK (get_bus_freq(0)/2) +#endif
#define CFG_SYS_BAUDRATE_TABLE \ {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}