1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-23 22:52:28 +02:00

[adm8668] move time related functions to their own file

Signed-off-by: Florian Fainelli <florian@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34544 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2012-12-06 22:39:18 +00:00
parent 6320bbfd3d
commit 4830146dfe
3 changed files with 18 additions and 13 deletions

View File

@ -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

View File

@ -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);

View File

@ -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);
}