aboutsummaryrefslogtreecommitdiff
path: root/board/freescale
diff options
context:
space:
mode:
authorCamelia Groza2023-07-11 15:49:25 +0300
committerPeng Fan2023-07-13 16:54:38 +0800
commit3a359c50002d18ab14ca750e8113cc5e63e2badd (patch)
tree401dfeea73c207c93c2fb003ab1d8a7e13bbd690 /board/freescale
parent4e69a447fab3eace7a092f5695d397ffa9170177 (diff)
board: freescale: t104xrdb: 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/t104xrdb/t104xrdb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c
index 562360de529..b3080492716 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;