summaryrefslogtreecommitdiff
path: root/board/freescale/t4rdb
diff options
context:
space:
mode:
authorCamelia Groza <camelia.groza@nxp.com>2023-07-11 15:49:20 +0300
committerPeng Fan <peng.fan@nxp.com>2023-07-13 11:54:29 +0300
commita325e7e8bd4e1715e2b701ba1fe534840391dfbf (patch)
tree15f9b6ce11df3b053fe1c1761932e378803a50ac /board/freescale/t4rdb
parentbaa807f815236de21a7cdb18c3f1bf76653b51cc (diff)
downloadu-boot-a325e7e8bd4e1715e2b701ba1fe534840391dfbf.tar.xz
board: freescale: t4240rdb: 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/t4rdb')
-rw-r--r--board/freescale/t4rdb/t4240rdb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/board/freescale/t4rdb/t4240rdb.c b/board/freescale/t4rdb/t4240rdb.c
index 0035bd796e..ab717769ed 100644
--- a/board/freescale/t4rdb/t4240rdb.c
+++ b/board/freescale/t4rdb/t4240rdb.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2014 Freescale Semiconductor, Inc.
+ * Copyright 2023 NXP
*/
#include <common.h>
@@ -20,6 +21,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 "t4rdb.h"
@@ -28,6 +30,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;