diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-27 20:29:34 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-27 20:29:34 -0400 |
commit | 93658cb8597ab76655220be43d3d7f74c66e9e4e (patch) | |
tree | e6da56aac9cda2c80315cc73ee31ef4c47af8472 /arch/arm | |
parent | 6e0ca95aa3c83c47d13f9f400bfaaa853d0b224b (diff) | |
parent | ad7722dab7292dbc1c4586d701ac226b68122d39 (diff) |
Merge branch 'pm-cpufreq'
* pm-cpufreq: (167 commits)
cpufreq: create per policy rwsem instead of per CPU cpu_policy_rwsem
intel_pstate: Add Baytrail support
intel_pstate: Refactor driver to support CPUs with different MSR layouts
cpufreq: Implement light weight ->target_index() routine
PM / OPP: rename header to linux/pm_opp.h
PM / OPP: rename data structures to dev_pm equivalents
PM / OPP: rename functions to dev_pm_opp*
cpufreq / governor: Remove fossil comment
cpufreq: exynos4210: Use the common clock framework to set APLL clock rate
cpufreq: exynos4x12: Use the common clock framework to set APLL clock rate
cpufreq: Detect spurious invocations of update_policy_cpu()
cpufreq: pmac64: enable cpufreq on iMac G5 (iSight) model
cpufreq: pmac64: provide cpufreq transition latency for older G5 models
cpufreq: pmac64: speed up frequency switch
cpufreq: highbank-cpufreq: Enable Midway/ECX-2000
exynos-cpufreq: fix false return check from "regulator_set_voltage"
speedstep-centrino: Remove unnecessary braces
acpi-cpufreq: Add comment under ACPI_ADR_SPACE_SYSTEM_IO case
cpufreq: arm-big-little: use clk_get instead of clk_get_sys
cpufreq: exynos: Show a list of available frequencies
...
Conflicts:
drivers/devfreq/exynos/exynos5_bus.c
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-davinci/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap-pm.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/opp.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-pxa/Kconfig | 3 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/generic.c | 81 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/generic.h | 7 | ||||
-rw-r--r-- | arch/arm/mach-ux500/Kconfig | 1 |
10 files changed, 36 insertions, 87 deletions
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index e026b19b23ea..a075b3e0c5c7 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig | |||
@@ -40,7 +40,6 @@ config ARCH_DAVINCI_DA850 | |||
40 | bool "DA850/OMAP-L138/AM18x based system" | 40 | bool "DA850/OMAP-L138/AM18x based system" |
41 | select ARCH_DAVINCI_DA8XX | 41 | select ARCH_DAVINCI_DA8XX |
42 | select ARCH_HAS_CPUFREQ | 42 | select ARCH_HAS_CPUFREQ |
43 | select CPU_FREQ_TABLE | ||
44 | select CP_INTC | 43 | select CP_INTC |
45 | 44 | ||
46 | config ARCH_DAVINCI_DA8XX | 45 | config ARCH_DAVINCI_DA8XX |
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 90372a21087f..699aabe296e1 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/of_address.h> | 25 | #include <linux/of_address.h> |
26 | #include <linux/of_irq.h> | 26 | #include <linux/of_irq.h> |
27 | #include <linux/of_platform.h> | 27 | #include <linux/of_platform.h> |
28 | #include <linux/opp.h> | 28 | #include <linux/pm_opp.h> |
29 | #include <linux/phy.h> | 29 | #include <linux/phy.h> |
30 | #include <linux/reboot.h> | 30 | #include <linux/reboot.h> |
31 | #include <linux/regmap.h> | 31 | #include <linux/regmap.h> |
@@ -226,7 +226,7 @@ static void __init imx6q_opp_check_1p2ghz(struct device *cpu_dev) | |||
226 | val = readl_relaxed(base + OCOTP_CFG3); | 226 | val = readl_relaxed(base + OCOTP_CFG3); |
227 | val >>= OCOTP_CFG3_SPEED_SHIFT; | 227 | val >>= OCOTP_CFG3_SPEED_SHIFT; |
228 | if ((val & 0x3) != OCOTP_CFG3_SPEED_1P2GHZ) | 228 | if ((val & 0x3) != OCOTP_CFG3_SPEED_1P2GHZ) |
229 | if (opp_disable(cpu_dev, 1200000000)) | 229 | if (dev_pm_opp_disable(cpu_dev, 1200000000)) |
230 | pr_warn("failed to disable 1.2 GHz OPP\n"); | 230 | pr_warn("failed to disable 1.2 GHz OPP\n"); |
231 | 231 | ||
232 | put_node: | 232 | put_node: |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index f26918467efc..6432ab8d9207 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
26 | #include <linux/input.h> | 26 | #include <linux/input.h> |
27 | #include <linux/gpio_keys.h> | 27 | #include <linux/gpio_keys.h> |
28 | #include <linux/opp.h> | 28 | #include <linux/pm_opp.h> |
29 | #include <linux/cpu.h> | 29 | #include <linux/cpu.h> |
30 | 30 | ||
31 | #include <linux/mtd/mtd.h> | 31 | #include <linux/mtd/mtd.h> |
@@ -522,11 +522,11 @@ static int __init beagle_opp_init(void) | |||
522 | return -ENODEV; | 522 | return -ENODEV; |
523 | } | 523 | } |
524 | /* Enable MPU 1GHz and lower opps */ | 524 | /* Enable MPU 1GHz and lower opps */ |
525 | r = opp_enable(mpu_dev, 800000000); | 525 | r = dev_pm_opp_enable(mpu_dev, 800000000); |
526 | /* TODO: MPU 1GHz needs SR and ABB */ | 526 | /* TODO: MPU 1GHz needs SR and ABB */ |
527 | 527 | ||
528 | /* Enable IVA 800MHz and lower opps */ | 528 | /* Enable IVA 800MHz and lower opps */ |
529 | r |= opp_enable(iva_dev, 660000000); | 529 | r |= dev_pm_opp_enable(iva_dev, 660000000); |
530 | /* TODO: DSP 800MHz needs SR and ABB */ | 530 | /* TODO: DSP 800MHz needs SR and ABB */ |
531 | if (r) { | 531 | if (r) { |
532 | pr_err("%s: failed to enable higher opp %d\n", | 532 | pr_err("%s: failed to enable higher opp %d\n", |
@@ -535,8 +535,8 @@ static int __init beagle_opp_init(void) | |||
535 | * Cleanup - disable the higher freqs - we dont care | 535 | * Cleanup - disable the higher freqs - we dont care |
536 | * about the results | 536 | * about the results |
537 | */ | 537 | */ |
538 | opp_disable(mpu_dev, 800000000); | 538 | dev_pm_opp_disable(mpu_dev, 800000000); |
539 | opp_disable(iva_dev, 660000000); | 539 | dev_pm_opp_disable(iva_dev, 660000000); |
540 | } | 540 | } |
541 | } | 541 | } |
542 | return 0; | 542 | return 0; |
diff --git a/arch/arm/mach-omap2/omap-pm.h b/arch/arm/mach-omap2/omap-pm.h index 67faa7b8fe92..1d777e63e05c 100644 --- a/arch/arm/mach-omap2/omap-pm.h +++ b/arch/arm/mach-omap2/omap-pm.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/device.h> | 17 | #include <linux/device.h> |
18 | #include <linux/cpufreq.h> | 18 | #include <linux/cpufreq.h> |
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <linux/opp.h> | 20 | #include <linux/pm_opp.h> |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * agent_id values for use with omap_pm_set_min_bus_tput(): | 23 | * agent_id values for use with omap_pm_set_min_bus_tput(): |
diff --git a/arch/arm/mach-omap2/opp.c b/arch/arm/mach-omap2/opp.c index bd41d59a7cab..ec21e6eb03e1 100644 --- a/arch/arm/mach-omap2/opp.c +++ b/arch/arm/mach-omap2/opp.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * GNU General Public License for more details. | 17 | * GNU General Public License for more details. |
18 | */ | 18 | */ |
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/opp.h> | 20 | #include <linux/pm_opp.h> |
21 | #include <linux/cpu.h> | 21 | #include <linux/cpu.h> |
22 | 22 | ||
23 | #include "omap_device.h" | 23 | #include "omap_device.h" |
@@ -81,14 +81,14 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def, | |||
81 | dev = &oh->od->pdev->dev; | 81 | dev = &oh->od->pdev->dev; |
82 | } | 82 | } |
83 | 83 | ||
84 | r = opp_add(dev, opp_def->freq, opp_def->u_volt); | 84 | r = dev_pm_opp_add(dev, opp_def->freq, opp_def->u_volt); |
85 | if (r) { | 85 | if (r) { |
86 | dev_err(dev, "%s: add OPP %ld failed for %s [%d] result=%d\n", | 86 | dev_err(dev, "%s: add OPP %ld failed for %s [%d] result=%d\n", |
87 | __func__, opp_def->freq, | 87 | __func__, opp_def->freq, |
88 | opp_def->hwmod_name, i, r); | 88 | opp_def->hwmod_name, i, r); |
89 | } else { | 89 | } else { |
90 | if (!opp_def->default_available) | 90 | if (!opp_def->default_available) |
91 | r = opp_disable(dev, opp_def->freq); | 91 | r = dev_pm_opp_disable(dev, opp_def->freq); |
92 | if (r) | 92 | if (r) |
93 | dev_err(dev, "%s: disable %ld failed for %s [%d] result=%d\n", | 93 | dev_err(dev, "%s: disable %ld failed for %s [%d] result=%d\n", |
94 | __func__, opp_def->freq, | 94 | __func__, opp_def->freq, |
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index e742118fcfd2..2f569b3c3092 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/err.h> | 15 | #include <linux/err.h> |
16 | #include <linux/opp.h> | 16 | #include <linux/pm_opp.h> |
17 | #include <linux/export.h> | 17 | #include <linux/export.h> |
18 | #include <linux/suspend.h> | 18 | #include <linux/suspend.h> |
19 | #include <linux/cpu.h> | 19 | #include <linux/cpu.h> |
@@ -131,7 +131,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, | |||
131 | { | 131 | { |
132 | struct voltagedomain *voltdm; | 132 | struct voltagedomain *voltdm; |
133 | struct clk *clk; | 133 | struct clk *clk; |
134 | struct opp *opp; | 134 | struct dev_pm_opp *opp; |
135 | unsigned long freq, bootup_volt; | 135 | unsigned long freq, bootup_volt; |
136 | struct device *dev; | 136 | struct device *dev; |
137 | 137 | ||
@@ -172,7 +172,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, | |||
172 | clk_put(clk); | 172 | clk_put(clk); |
173 | 173 | ||
174 | rcu_read_lock(); | 174 | rcu_read_lock(); |
175 | opp = opp_find_freq_ceil(dev, &freq); | 175 | opp = dev_pm_opp_find_freq_ceil(dev, &freq); |
176 | if (IS_ERR(opp)) { | 176 | if (IS_ERR(opp)) { |
177 | rcu_read_unlock(); | 177 | rcu_read_unlock(); |
178 | pr_err("%s: unable to find boot up OPP for vdd_%s\n", | 178 | pr_err("%s: unable to find boot up OPP for vdd_%s\n", |
@@ -180,7 +180,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, | |||
180 | goto exit; | 180 | goto exit; |
181 | } | 181 | } |
182 | 182 | ||
183 | bootup_volt = opp_get_voltage(opp); | 183 | bootup_volt = dev_pm_opp_get_voltage(opp); |
184 | rcu_read_unlock(); | 184 | rcu_read_unlock(); |
185 | if (!bootup_volt) { | 185 | if (!bootup_volt) { |
186 | pr_err("%s: unable to find voltage corresponding to the bootup OPP for vdd_%s\n", | 186 | pr_err("%s: unable to find voltage corresponding to the bootup OPP for vdd_%s\n", |
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index a8427115ee07..96100dbf5a2e 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -615,14 +615,12 @@ endmenu | |||
615 | config PXA25x | 615 | config PXA25x |
616 | bool | 616 | bool |
617 | select CPU_XSCALE | 617 | select CPU_XSCALE |
618 | select CPU_FREQ_TABLE if CPU_FREQ | ||
619 | help | 618 | help |
620 | Select code specific to PXA21x/25x/26x variants | 619 | Select code specific to PXA21x/25x/26x variants |
621 | 620 | ||
622 | config PXA27x | 621 | config PXA27x |
623 | bool | 622 | bool |
624 | select CPU_XSCALE | 623 | select CPU_XSCALE |
625 | select CPU_FREQ_TABLE if CPU_FREQ | ||
626 | help | 624 | help |
627 | Select code specific to PXA27x variants | 625 | Select code specific to PXA27x variants |
628 | 626 | ||
@@ -635,7 +633,6 @@ config CPU_PXA26x | |||
635 | config PXA3xx | 633 | config PXA3xx |
636 | bool | 634 | bool |
637 | select CPU_XSC3 | 635 | select CPU_XSC3 |
638 | select CPU_FREQ_TABLE if CPU_FREQ | ||
639 | help | 636 | help |
640 | Select code specific to PXA3xx variants | 637 | Select code specific to PXA3xx variants |
641 | 638 | ||
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index f25b6119e028..d4ea142c4edd 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -42,74 +42,31 @@ EXPORT_SYMBOL(reset_status); | |||
42 | /* | 42 | /* |
43 | * This table is setup for a 3.6864MHz Crystal. | 43 | * This table is setup for a 3.6864MHz Crystal. |
44 | */ | 44 | */ |
45 | static const unsigned short cclk_frequency_100khz[NR_FREQS] = { | 45 | struct cpufreq_frequency_table sa11x0_freq_table[NR_FREQS+1] = { |
46 | 590, /* 59.0 MHz */ | 46 | { .frequency = 59000, /* 59.0 MHz */}, |
47 | 737, /* 73.7 MHz */ | 47 | { .frequency = 73700, /* 73.7 MHz */}, |
48 | 885, /* 88.5 MHz */ | 48 | { .frequency = 88500, /* 88.5 MHz */}, |
49 | 1032, /* 103.2 MHz */ | 49 | { .frequency = 103200, /* 103.2 MHz */}, |
50 | 1180, /* 118.0 MHz */ | 50 | { .frequency = 118000, /* 118.0 MHz */}, |
51 | 1327, /* 132.7 MHz */ | 51 | { .frequency = 132700, /* 132.7 MHz */}, |
52 | 1475, /* 147.5 MHz */ | 52 | { .frequency = 147500, /* 147.5 MHz */}, |
53 | 1622, /* 162.2 MHz */ | 53 | { .frequency = 162200, /* 162.2 MHz */}, |
54 | 1769, /* 176.9 MHz */ | 54 | { .frequency = 176900, /* 176.9 MHz */}, |
55 | 1917, /* 191.7 MHz */ | 55 | { .frequency = 191700, /* 191.7 MHz */}, |
56 | 2064, /* 206.4 MHz */ | 56 | { .frequency = 206400, /* 206.4 MHz */}, |
57 | 2212, /* 221.2 MHz */ | 57 | { .frequency = 221200, /* 221.2 MHz */}, |
58 | 2359, /* 235.9 MHz */ | 58 | { .frequency = 235900, /* 235.9 MHz */}, |
59 | 2507, /* 250.7 MHz */ | 59 | { .frequency = 250700, /* 250.7 MHz */}, |
60 | 2654, /* 265.4 MHz */ | 60 | { .frequency = 265400, /* 265.4 MHz */}, |
61 | 2802 /* 280.2 MHz */ | 61 | { .frequency = 280200, /* 280.2 MHz */}, |
62 | { .frequency = CPUFREQ_TABLE_END, }, | ||
62 | }; | 63 | }; |
63 | 64 | ||
64 | /* rounds up(!) */ | ||
65 | unsigned int sa11x0_freq_to_ppcr(unsigned int khz) | ||
66 | { | ||
67 | int i; | ||
68 | |||
69 | khz /= 100; | ||
70 | |||
71 | for (i = 0; i < NR_FREQS; i++) | ||
72 | if (cclk_frequency_100khz[i] >= khz) | ||
73 | break; | ||
74 | |||
75 | return i; | ||
76 | } | ||
77 | |||
78 | unsigned int sa11x0_ppcr_to_freq(unsigned int idx) | ||
79 | { | ||
80 | unsigned int freq = 0; | ||
81 | if (idx < NR_FREQS) | ||
82 | freq = cclk_frequency_100khz[idx] * 100; | ||
83 | return freq; | ||
84 | } | ||
85 | |||
86 | |||
87 | /* make sure that only the "userspace" governor is run -- anything else wouldn't make sense on | ||
88 | * this platform, anyway. | ||
89 | */ | ||
90 | int sa11x0_verify_speed(struct cpufreq_policy *policy) | ||
91 | { | ||
92 | unsigned int tmp; | ||
93 | if (policy->cpu) | ||
94 | return -EINVAL; | ||
95 | |||
96 | cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, policy->cpuinfo.max_freq); | ||
97 | |||
98 | /* make sure that at least one frequency is within the policy */ | ||
99 | tmp = cclk_frequency_100khz[sa11x0_freq_to_ppcr(policy->min)] * 100; | ||
100 | if (tmp > policy->max) | ||
101 | policy->max = tmp; | ||
102 | |||
103 | cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, policy->cpuinfo.max_freq); | ||
104 | |||
105 | return 0; | ||
106 | } | ||
107 | |||
108 | unsigned int sa11x0_getspeed(unsigned int cpu) | 65 | unsigned int sa11x0_getspeed(unsigned int cpu) |
109 | { | 66 | { |
110 | if (cpu) | 67 | if (cpu) |
111 | return 0; | 68 | return 0; |
112 | return cclk_frequency_100khz[PPCR & 0xf] * 100; | 69 | return sa11x0_freq_table[PPCR & 0xf].frequency; |
113 | } | 70 | } |
114 | 71 | ||
115 | /* | 72 | /* |
diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h index 9a33695c9492..0d92e119b36b 100644 --- a/arch/arm/mach-sa1100/generic.h +++ b/arch/arm/mach-sa1100/generic.h | |||
@@ -3,6 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Author: Nicolas Pitre | 4 | * Author: Nicolas Pitre |
5 | */ | 5 | */ |
6 | #include <linux/cpufreq.h> | ||
6 | #include <linux/reboot.h> | 7 | #include <linux/reboot.h> |
7 | 8 | ||
8 | extern void sa1100_timer_init(void); | 9 | extern void sa1100_timer_init(void); |
@@ -19,12 +20,8 @@ extern void sa11x0_init_late(void); | |||
19 | extern void sa1110_mb_enable(void); | 20 | extern void sa1110_mb_enable(void); |
20 | extern void sa1110_mb_disable(void); | 21 | extern void sa1110_mb_disable(void); |
21 | 22 | ||
22 | struct cpufreq_policy; | 23 | extern struct cpufreq_frequency_table sa11x0_freq_table[]; |
23 | |||
24 | extern unsigned int sa11x0_freq_to_ppcr(unsigned int khz); | ||
25 | extern int sa11x0_verify_speed(struct cpufreq_policy *policy); | ||
26 | extern unsigned int sa11x0_getspeed(unsigned int cpu); | 24 | extern unsigned int sa11x0_getspeed(unsigned int cpu); |
27 | extern unsigned int sa11x0_ppcr_to_freq(unsigned int idx); | ||
28 | 25 | ||
29 | struct flash_platform_data; | 26 | struct flash_platform_data; |
30 | struct resource; | 27 | struct resource; |
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index 99a28d628297..7a3fc1af6944 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig | |||
@@ -34,7 +34,6 @@ config UX500_SOC_COMMON | |||
34 | 34 | ||
35 | config UX500_SOC_DB8500 | 35 | config UX500_SOC_DB8500 |
36 | bool | 36 | bool |
37 | select CPU_FREQ_TABLE if CPU_FREQ | ||
38 | select MFD_DB8500_PRCMU | 37 | select MFD_DB8500_PRCMU |
39 | select PINCTRL_DB8500 | 38 | select PINCTRL_DB8500 |
40 | select PINCTRL_DB8540 | 39 | select PINCTRL_DB8540 |