diff options
-rw-r--r-- | board/freescale/t104xrdb/t104xrdb.c | 9 | ||||
-rw-r--r-- | include/configs/T104xRDB.h | 4 |
2 files changed, 12 insertions, 1 deletions
diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c index 562360d..b308049 100644 --- a/board/freescale/t104xrdb/t104xrdb.c +++ b/board/freescale/t104xrdb/t104xrdb.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2013 Freescale Semiconductor, Inc. + * Copyright 2023 NXP */ #include <common.h> @@ -22,6 +23,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 "../common/sleep.h" #include "t104xrdb.h" @@ -29,6 +31,13 @@ DECLARE_GLOBAL_DATA_PTR; +#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/T104xRDB.h b/include/configs/T104xRDB.h index f196bd7..01db298 100644 --- a/include/configs/T104xRDB.h +++ b/include/configs/T104xRDB.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright 2014 Freescale Semiconductor, Inc. - * Copyright 2020-2021 NXP + * Copyright 2020-2023 NXP */ #ifndef __CONFIG_H @@ -238,7 +238,9 @@ * open - index 2 * shorted - index 1 */ +#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} |