From: Mario Six <mario.six@gdsys.cc>
Date: Mon, 21 Jan 2019 08:18:05 +0000 (+0100)
Subject: powerpc: mpc83xx: Implement get_serial_clock()
X-Git-Tag: v2025.01-rc5-pxa1908~2967^2~44
X-Git-Url: http://git.dujemihanovic.xyz/img/%7B%7B?a=commitdiff_plain;h=ac016c94ae21ae6bb14632bf1092278f1f096c8e;p=u-boot.git

powerpc: mpc83xx: Implement get_serial_clock()

DM serial drivers on PowerPC determine their clock frequency via the
get_serial_clock function. This function is not Implemented yet for
MPC83xx.

This patch Implements the function so that DM serial drivers work on
MPC83xx.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
---

diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c
index e870a23103..e118a10fa8 100644
--- a/arch/powerpc/cpu/mpc83xx/speed.c
+++ b/arch/powerpc/cpu/mpc83xx/speed.c
@@ -516,6 +516,11 @@ ulong get_ddr_freq(ulong dummy)
 	return gd->mem_clk;
 }
 
+int get_serial_clock(void)
+{
+	return get_bus_freq(0);
+}
+
 static int do_clocks(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	char buf[32];