diff options
author | Marek Vasut <marek.vasut+renesas@gmail.com> | 2018-08-24 21:34:07 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2018-09-15 03:19:07 +0200 |
commit | ccce3acfe70bdfb4fa8529dc853294f82859b08b (patch) | |
tree | 6d2d2290d4841f7a56e7540d6da8ed13bfb2e841 /arch | |
parent | ae59a9f8f7785d86277149eb37314d2f21392f6f (diff) |
sh: tmu: Clean up CONFIG_SH_TMU_CLK_FREQ
The R-Car Gen2 feeds the TMU with CONFIG_SYS_CLK_FREQ / 2,
while the old SH parts use CONFIG_SYS_CLK_FREQ directly.
Just put this into the TMU implementation and drop the
CONFIG_SH_TMU_CLK_FREQ config option.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/lib/time.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/sh/lib/time.c b/arch/sh/lib/time.c index 0f3127106a..9a1d3fb013 100644 --- a/arch/sh/lib/time.c +++ b/arch/sh/lib/time.c @@ -22,7 +22,11 @@ static struct tmu_regs *tmu = (struct tmu_regs *)TMU_BASE; unsigned long get_tbclk(void) { - return CONFIG_SH_TMU_CLK_FREQ / 4; +#ifdef CONFIG_RCAR_GEN2 + return CONFIG_SYS_CLK_FREQ / 8; +#else + return CONFIG_SYS_CLK_FREQ / 4; +#endif } unsigned long timer_read_counter(void) |