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>
10 #include <linux/export.h>
11 #include <linux/init.h>
12 #include <linux/clk.h>
16 #include <asm/div64.h>
18 #include <lantiq_soc.h>
21 #define LTQ_CGU_SYS 0x0010
23 unsigned int ltq_get_io_region_clock(void)
27 EXPORT_SYMBOL(ltq_get_io_region_clock
);
29 unsigned int ltq_get_fpi_bus_clock(int fpi
)
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))
42 EXPORT_SYMBOL(ltq_get_cpu_hz
);
44 unsigned int ltq_get_fpi_hz(void)
48 EXPORT_SYMBOL(ltq_get_fpi_hz
);