Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-btrfs-devel.git] / arch / mips / lantiq / xway / clk-ase.c
blob22d823acd536a3bcfee7708c90a593f57835d143
1 /*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License version 2 as published
4 * by the Free Software Foundation.
6 * Copyright (C) 2011 John Crispin <blogic@openwrt.org>
7 */
9 #include <linux/io.h>
10 #include <linux/module.h>
11 #include <linux/init.h>
12 #include <linux/clk.h>
14 #include <asm/time.h>
15 #include <asm/irq.h>
16 #include <asm/div64.h>
18 #include <lantiq_soc.h>
20 /* cgu registers */
21 #define LTQ_CGU_SYS 0x0010
23 unsigned int ltq_get_io_region_clock(void)
25 return CLOCK_133M;
27 EXPORT_SYMBOL(ltq_get_io_region_clock);
29 unsigned int ltq_get_fpi_bus_clock(int fpi)
31 return CLOCK_133M;
33 EXPORT_SYMBOL(ltq_get_fpi_bus_clock);
35 unsigned int ltq_get_cpu_hz(void)
37 if (ltq_cgu_r32(LTQ_CGU_SYS) & (1 << 5))
38 return CLOCK_266M;
39 else
40 return CLOCK_133M;
42 EXPORT_SYMBOL(ltq_get_cpu_hz);
44 unsigned int ltq_get_fpi_hz(void)
46 return CLOCK_133M;
48 EXPORT_SYMBOL(ltq_get_fpi_hz);