@@ -131,6 +131,7 @@ config SOC_IMX25
config SOC_IMX27
bool
+ select ARCH_HAS_CPUFREQ
select COMMON_CLK
select CPU_ARM926T
select IMX_HAVE_IOMUX_V1
@@ -7,6 +7,9 @@ obj-$(CONFIG_SOC_IMX25) += clk-imx25.o mm-imx25.o ehci-imx25.o cpu-imx25.o
obj-$(CONFIG_SOC_IMX27) += cpu-imx27.o pm-imx27.o
obj-$(CONFIG_SOC_IMX27) += clk-imx27.o mm-imx27.o ehci-imx27.o
+ifdef CONFIG_SOC_IMX27
+obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx27.o
+endif
obj-$(CONFIG_SOC_IMX31) += mm-imx3.o cpu-imx31.o clk-imx31.o iomux-imx31.o ehci-imx31.o pm-imx3.o
obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o clk-imx35.o ehci-imx35.o pm-imx3.o
@@ -9,6 +9,7 @@
#include "clk.h"
#include "common.h"
#include "hardware.h"
+#include "cpu_op-mx27.h"
#define IO_ADDR_CCM(off) (MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR + (off)))
@@ -91,6 +92,10 @@ int __init mx27_clocks_init(unsigned long fref)
{
int i;
+#if defined(CONFIG_CPU_FREQ_IMX)
+ get_cpu_op = mx27_get_cpu_op;
+#endif
+
clk[dummy] = imx_clk_fixed("dummy", 0);
clk[ckih] = imx_clk_fixed("ckih", fref);
clk[ckil] = imx_clk_fixed("ckil", 32768);
new file mode 100644
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2011 Teresa Gámez <t.gamez@phytec.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include <linux/bug.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+
+#include "hardware.h"
+
+static struct cpu_op mx27_cpu_op[] = {
+ {
+ .cpu_rate = 133000000,
+ }, {
+ .cpu_rate = 399000000,
+ },
+};
+
+struct cpu_op *mx27_get_cpu_op(int *op)
+{
+ *op = ARRAY_SIZE(mx27_cpu_op);
+ return mx27_cpu_op;
+}
new file mode 100644
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2011 Teresa Gámez <t.gamez@phytec.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+extern struct cpu_op *mx27_get_cpu_op(int *op);