diff options
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/db8500-cpufreq.c | 4 | ||||
-rw-r--r-- | drivers/cpufreq/exynos-cpufreq.c | 4 | ||||
-rw-r--r-- | drivers/cpufreq/exynos-cpufreq.h | 48 | ||||
-rw-r--r-- | drivers/cpufreq/exynos4210-cpufreq.c | 3 | ||||
-rw-r--r-- | drivers/cpufreq/exynos4x12-cpufreq.c | 3 | ||||
-rw-r--r-- | drivers/cpufreq/exynos5250-cpufreq.c | 3 |
6 files changed, 56 insertions, 9 deletions
diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/db8500-cpufreq.c index 79a84860ea5..48a1988149d 100644 --- a/drivers/cpufreq/db8500-cpufreq.c +++ b/drivers/cpufreq/db8500-cpufreq.c @@ -15,7 +15,6 @@ #include <linux/slab.h> #include <linux/platform_device.h> #include <linux/clk.h> -#include <mach/id.h> static struct cpufreq_frequency_table *freq_table; static struct clk *armss_clk; @@ -165,9 +164,6 @@ static struct platform_driver db8500_cpufreq_plat_driver = { static int __init db8500_cpufreq_register(void) { - if (!cpu_is_u8500_family()) - return -ENODEV; - pr_info("cpufreq for DB8500 started\n"); return platform_driver_register(&db8500_cpufreq_plat_driver); } diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c index 69b676dd335..78057a357dd 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers/cpufreq/exynos-cpufreq.c @@ -18,10 +18,10 @@ #include <linux/cpufreq.h> #include <linux/suspend.h> -#include <mach/cpufreq.h> - #include <plat/cpu.h> +#include "exynos-cpufreq.h" + static struct exynos_dvfs_info *exynos_info; static struct regulator *arm_regulator; diff --git a/drivers/cpufreq/exynos-cpufreq.h b/drivers/cpufreq/exynos-cpufreq.h new file mode 100644 index 00000000000..92b852ee5dd --- /dev/null +++ b/drivers/cpufreq/exynos-cpufreq.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2010 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * EXYNOS - CPUFreq support + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +enum cpufreq_level_index { + L0, L1, L2, L3, L4, + L5, L6, L7, L8, L9, + L10, L11, L12, L13, L14, + L15, L16, L17, L18, L19, + L20, +}; + +#define APLL_FREQ(f, a0, a1, a2, a3, a4, a5, a6, a7, b0, b1, b2, m, p, s) \ + { \ + .freq = (f) * 1000, \ + .clk_div_cpu0 = ((a0) | (a1) << 4 | (a2) << 8 | (a3) << 12 | \ + (a4) << 16 | (a5) << 20 | (a6) << 24 | (a7) << 28), \ + .clk_div_cpu1 = (b0 << 0 | b1 << 4 | b2 << 8), \ + .mps = ((m) << 16 | (p) << 8 | (s)), \ + } + +struct apll_freq { + unsigned int freq; + u32 clk_div_cpu0; + u32 clk_div_cpu1; + u32 mps; +}; + +struct exynos_dvfs_info { + unsigned long mpll_freq_khz; + unsigned int pll_safe_idx; + struct clk *cpu_clk; + unsigned int *volt_table; + struct cpufreq_frequency_table *freq_table; + void (*set_freq)(unsigned int, unsigned int); + bool (*need_apll_change)(unsigned int, unsigned int); +}; + +extern int exynos4210_cpufreq_init(struct exynos_dvfs_info *); +extern int exynos4x12_cpufreq_init(struct exynos_dvfs_info *); +extern int exynos5250_cpufreq_init(struct exynos_dvfs_info *); diff --git a/drivers/cpufreq/exynos4210-cpufreq.c b/drivers/cpufreq/exynos4210-cpufreq.c index de91755e255..add7fbec4fc 100644 --- a/drivers/cpufreq/exynos4210-cpufreq.c +++ b/drivers/cpufreq/exynos4210-cpufreq.c @@ -18,7 +18,8 @@ #include <linux/cpufreq.h> #include <mach/regs-clock.h> -#include <mach/cpufreq.h> + +#include "exynos-cpufreq.h" static struct clk *cpu_clk; static struct clk *moutcore; diff --git a/drivers/cpufreq/exynos4x12-cpufreq.c b/drivers/cpufreq/exynos4x12-cpufreq.c index 0661039e5d4..08b7477b0aa 100644 --- a/drivers/cpufreq/exynos4x12-cpufreq.c +++ b/drivers/cpufreq/exynos4x12-cpufreq.c @@ -18,7 +18,8 @@ #include <linux/cpufreq.h> #include <mach/regs-clock.h> -#include <mach/cpufreq.h> + +#include "exynos-cpufreq.h" static struct clk *cpu_clk; static struct clk *moutcore; diff --git a/drivers/cpufreq/exynos5250-cpufreq.c b/drivers/cpufreq/exynos5250-cpufreq.c index b9344869f82..9fae466d774 100644 --- a/drivers/cpufreq/exynos5250-cpufreq.c +++ b/drivers/cpufreq/exynos5250-cpufreq.c @@ -19,7 +19,8 @@ #include <mach/map.h> #include <mach/regs-clock.h> -#include <mach/cpufreq.h> + +#include "exynos-cpufreq.h" static struct clk *cpu_clk; static struct clk *moutcore; |