diff options
Diffstat (limited to 'target/linux/adm8668/files/arch/mips/adm8668/time.c')
-rw-r--r-- | target/linux/adm8668/files/arch/mips/adm8668/time.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/target/linux/adm8668/files/arch/mips/adm8668/time.c b/target/linux/adm8668/files/arch/mips/adm8668/time.c new file mode 100644 index 0000000000..047bccdedd --- /dev/null +++ b/target/linux/adm8668/files/arch/mips/adm8668/time.c @@ -0,0 +1,17 @@ +#include <linux/init.h> +#include <linux/kernel.h> + +#include <asm/time.h> +#include <adm8668.h> + +void __init plat_time_init(void) +{ + int adj = (ADM8668_CONFIG_REG(ADM8668_CR3) >> 11) & 0xf; + + /* adjustable clock selection + CR3 bit 14~11, 0000 -> 175MHz, 0001 -> 180MHz, etc... */ + + mips_hpt_frequency = (SYS_CLOCK + adj * 5000000) / 2; + printk("ADM8668 CPU clock: %d MHz\n", 2*mips_hpt_frequency / 1000000); +} + |