[U-Boot] [PATCH 06/11] sh: tmu: Inline get_tmu0_clk_rate()

Marek Vasut marek.vasut at gmail.com
Thu Aug 30 13:38:35 UTC 2018


This function just returns CONFIG_SH_TMU_CLK_FREQ, use the constant
directly instead.

Signed-off-by: Marek Vasut <marek.vasut+renesas at gmail.com>
---
 arch/sh/lib/time.c | 2 +-
 include/sh_tmu.h   | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/sh/lib/time.c b/arch/sh/lib/time.c
index 6273f39f21..0f3127106a 100644
--- a/arch/sh/lib/time.c
+++ b/arch/sh/lib/time.c
@@ -22,7 +22,7 @@ static struct tmu_regs *tmu = (struct tmu_regs *)TMU_BASE;
 
 unsigned long get_tbclk(void)
 {
-	return get_tmu0_clk_rate() >> 2;
+	return CONFIG_SH_TMU_CLK_FREQ / 4;
 }
 
 unsigned long timer_read_counter(void)
diff --git a/include/sh_tmu.h b/include/sh_tmu.h
index aa60c98750..70aca2149a 100644
--- a/include/sh_tmu.h
+++ b/include/sh_tmu.h
@@ -67,9 +67,4 @@ struct tmu_regs {
 };
 #endif /* CONFIG_CPU_SH4 */
 
-static inline unsigned long get_tmu0_clk_rate(void)
-{
-	return CONFIG_SH_TMU_CLK_FREQ;
-}
-
 #endif	/* __SH_TMU_H */
-- 
2.18.0



More information about the U-Boot mailing list