aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/adm8668
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2012-12-06 22:39:18 +0000
committerFlorian Fainelli <florian@openwrt.org>2012-12-06 22:39:18 +0000
commit192c1e90bc8b47b59813e4d383816e0aae7dfe3e (patch)
tree27877195ca5f55777006ae0a7d847f0117cfbc93 /target/linux/adm8668
parent1f939889ca6f6e4234d7bd01e1e0adcd986be733 (diff)
downloadupstream-192c1e90bc8b47b59813e4d383816e0aae7dfe3e.tar.gz
upstream-192c1e90bc8b47b59813e4d383816e0aae7dfe3e.tar.bz2
upstream-192c1e90bc8b47b59813e4d383816e0aae7dfe3e.zip
move time related functions to their own file
Signed-off-by: Florian Fainelli <florian@openwrt.org> SVN-Revision: 34544
Diffstat (limited to 'target/linux/adm8668')
-rw-r--r--target/linux/adm8668/files/arch/mips/adm8668/Makefile2
-rw-r--r--target/linux/adm8668/files/arch/mips/adm8668/platform.c12
-rw-r--r--target/linux/adm8668/files/arch/mips/adm8668/time.c17
3 files changed, 18 insertions, 13 deletions
diff --git a/target/linux/adm8668/files/arch/mips/adm8668/Makefile b/target/linux/adm8668/files/arch/mips/adm8668/Makefile
index ef836bb5db..c69864d164 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 1b1c0700c1..dc4817f191 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 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);
+}
+