mirror of https://gitee.com/openkylin/linux.git
sh: Only provide a PCLK definition for legacy CPG CPUs.
As CPUs are migrated over to more fully-featured clock frameworks of their own and off of the legacy CPG code, they no longer have any real need for defining the PCLK value. The PCLK define in itself is already fairly misleading, as many boards get their input clocks from different sources, making this value fairly arbitrary anyways. Outside of the legacy CPG clock framework, the only place where this value is used is for deriving CLOCK_TICK_RATE, which we set back to the legacy PIT value that it was before the PCLK definitions were added in the first place. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
6b7b284958
commit
8152a74bc0
|
@ -540,14 +540,16 @@ config SH_TIMER_MTU2
|
|||
|
||||
config SH_PCLK_FREQ
|
||||
int "Peripheral clock frequency (in Hz)"
|
||||
default "27000000" if CPU_SUBTYPE_SH7343
|
||||
depends on SH_CLK_CPG_LEGACY
|
||||
default "31250000" if CPU_SUBTYPE_SH7619
|
||||
default "32000000" if CPU_SUBTYPE_SH7722
|
||||
default "33333333" if CPU_SUBTYPE_SH7770 || CPU_SUBTYPE_SH7723 || \
|
||||
CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7705 || \
|
||||
CPU_SUBTYPE_SH7203 || CPU_SUBTYPE_SH7206 || \
|
||||
CPU_SUBTYPE_SH7263 || CPU_SUBTYPE_MXG || \
|
||||
CPU_SUBTYPE_SH7786 || CPU_SUBTYPE_SH7724
|
||||
default "33333333" if CPU_SUBTYPE_SH7770 || \
|
||||
CPU_SUBTYPE_SH7760 || \
|
||||
CPU_SUBTYPE_SH7705 || \
|
||||
CPU_SUBTYPE_SH7203 || \
|
||||
CPU_SUBTYPE_SH7206 || \
|
||||
CPU_SUBTYPE_SH7263 || \
|
||||
CPU_SUBTYPE_MXG || \
|
||||
CPU_SUBTYPE_SH7786
|
||||
default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
|
||||
default "66000000" if CPU_SUBTYPE_SH4_202
|
||||
default "50000000"
|
||||
|
|
|
@ -6,7 +6,17 @@
|
|||
#ifndef __ASM_SH_TIMEX_H
|
||||
#define __ASM_SH_TIMEX_H
|
||||
|
||||
/*
|
||||
* Only parts using the legacy CPG code for their clock framework
|
||||
* implementation need to define their own Pclk value. If provided, this
|
||||
* can be used for accurately setting CLOCK_TICK_RATE, otherwise we
|
||||
* simply fall back on the i8253 PIT value.
|
||||
*/
|
||||
#ifdef CONFIG_SH_PCLK_FREQ
|
||||
#define CLOCK_TICK_RATE (CONFIG_SH_PCLK_FREQ / 4) /* Underlying HZ */
|
||||
#else
|
||||
#define CLOCK_TICK_RATE 1193180
|
||||
#endif
|
||||
|
||||
#include <asm-generic/timex.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue