diff options
author | Camelia Groza <camelia.groza@nxp.com> | 2023-07-11 15:49:30 +0300 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2023-07-13 16:54:54 +0800 |
commit | 23b60eb7a24d7c8d622215f72509f516009892fa (patch) | |
tree | 97a4d13d86bb0988bd2db6714885ff186ff26dbe /board/freescale | |
parent | f416f33ece8b090e95f358e4ed2e2fdf2d6fb24d (diff) | |
download | u-boot-23b60eb7a24d7c8d622215f72509f516009892fa.zip u-boot-23b60eb7a24d7c8d622215f72509f516009892fa.tar.gz u-boot-23b60eb7a24d7c8d622215f72509f516009892fa.tar.bz2 |
board: freescale: t102xrdb: implement get_serial_clock
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>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'board/freescale')
-rw-r--r-- | board/freescale/t102xrdb/t102xrdb.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/board/freescale/t102xrdb/t102xrdb.c b/board/freescale/t102xrdb/t102xrdb.c index ffc4c11..73f9d3a 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; |