diff options
author | Camelia Groza | 2023-07-11 15:49:15 +0300 |
---|---|---|
committer | Peng Fan | 2023-07-13 16:54:14 +0800 |
commit | b14f37c73f4906d659706662627fd3d5c5732f92 (patch) | |
tree | bc2e8798459fb19a198178e314e3aabc2bc6bab8 /board/freescale/t208xrdb | |
parent | a85b8c75390ce03f923deabe1992db58e0052239 (diff) |
board: freescale: t2080rdb: 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/t208xrdb')
-rw-r--r-- | board/freescale/t208xrdb/t208xrdb.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/board/freescale/t208xrdb/t208xrdb.c b/board/freescale/t208xrdb/t208xrdb.c index 13a2d3dcde6..e33e5d082d8 100644 --- a/board/freescale/t208xrdb/t208xrdb.c +++ b/board/freescale/t208xrdb/t208xrdb.c @@ -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 "t208xrdb.h" #include "cpld.h" @@ -42,6 +43,13 @@ u8 get_hw_revision(void) } } +#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; |