From 4830146dfef42da07dc251fcb797645c16bbfb67 Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 6 Dec 2012 22:39:18 +0000 Subject: [adm8668] move time related functions to their own file Signed-off-by: Florian Fainelli git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34544 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/adm8668/files/arch/mips/adm8668/Makefile | 2 +- target/linux/adm8668/files/arch/mips/adm8668/platform.c | 12 ------------ target/linux/adm8668/files/arch/mips/adm8668/time.c | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 target/linux/adm8668/files/arch/mips/adm8668/time.c (limited to 'target') diff --git a/target/linux/adm8668/files/arch/mips/adm8668/Makefile b/target/linux/adm8668/files/arch/mips/adm8668/Makefile index ef836bb5d..c69864d16 100644 --- a/target/linux/adm8668/files/arch/mips/adm8668/Makefile +++ b/target/linux/adm8668/files/arch/mips/adm8668/Makefile @@ -3,5 +3,5 @@ # obj-y := irq.o pci.o prom.o platform.o serial.o proc.o \ - setup.o \ + setup.o time.o \ net_core.o net_intr.o diff --git a/target/linux/adm8668/files/arch/mips/adm8668/platform.c b/target/linux/adm8668/files/arch/mips/adm8668/platform.c index 1b1c0700c..dc4817f19 100644 --- a/target/linux/adm8668/files/arch/mips/adm8668/platform.c +++ b/target/linux/adm8668/files/arch/mips/adm8668/platform.c @@ -85,16 +85,4 @@ int __devinit adm8668_devs_register(void) return 0; } - -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); -} - arch_initcall(adm8668_devs_register); 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 000000000..047bccded --- /dev/null +++ b/target/linux/adm8668/files/arch/mips/adm8668/time.c @@ -0,0 +1,17 @@ +#include +#include + +#include +#include + +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); +} + -- cgit v1.2.3