Skip to content

Commit

Permalink
Merge back earlier 'pm-cpufreq' material.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael J. Wysocki committed Mar 17, 2014
2 parents 2ed99e3 + 2449d33 commit 15afee3
Show file tree
Hide file tree
Showing 46 changed files with 298 additions and 514 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-spear/spear1310.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
static void __init spear1310_dt_init(void)
{
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
platform_device_register_simple("spear-cpufreq", -1, NULL, 0);
}

static const char * const spear1310_dt_board_compat[] = {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-spear/spear1340.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ static void __init spear1340_dt_init(void)
{
of_platform_populate(NULL, of_default_bus_match_table,
spear1340_auxdata_lookup, NULL);
platform_device_register_simple("spear-cpufreq", -1, NULL, 0);
}

static const char * const spear1340_dt_board_compat[] = {
Expand Down
8 changes: 8 additions & 0 deletions arch/arm64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,14 @@ source "drivers/cpuidle/Kconfig"

endmenu

menu "Power management options"

source "kernel/power/Kconfig"

source "drivers/cpufreq/Kconfig"

endmenu

source "net/Kconfig"

source "drivers/Kconfig"
Expand Down
5 changes: 5 additions & 0 deletions drivers/base/power/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <linux/async.h>
#include <linux/suspend.h>
#include <trace/events/power.h>
#include <linux/cpufreq.h>
#include <linux/cpuidle.h>
#include <linux/timer.h>

Expand Down Expand Up @@ -789,6 +790,8 @@ void dpm_resume(pm_message_t state)
mutex_unlock(&dpm_list_mtx);
async_synchronize_full();
dpm_show_time(starttime, state, NULL);

cpufreq_resume();
}

/**
Expand Down Expand Up @@ -1259,6 +1262,8 @@ int dpm_suspend(pm_message_t state)

might_sleep();

cpufreq_suspend();

mutex_lock(&dpm_list_mtx);
pm_transition = state;
async_error = 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/cpufreq/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ source "drivers/cpufreq/Kconfig.x86"
endmenu

menu "ARM CPU frequency scaling drivers"
depends on ARM
depends on ARM || ARM64
source "drivers/cpufreq/Kconfig.arm"
endmenu

Expand Down
1 change: 0 additions & 1 deletion drivers/cpufreq/acpi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,6 @@ static int acpi_cpufreq_cpu_exit(struct cpufreq_policy *policy)
pr_debug("acpi_cpufreq_cpu_exit\n");

if (data) {
cpufreq_frequency_table_put_attr(policy->cpu);
per_cpu(acfreq_data, policy->cpu) = NULL;
acpi_processor_unregister_performance(data->acpi_data,
policy->cpu);
Expand Down
1 change: 0 additions & 1 deletion drivers/cpufreq/arm_big_little.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,6 @@ static int bL_cpufreq_exit(struct cpufreq_policy *policy)
return -ENODEV;
}

cpufreq_frequency_table_put_attr(policy->cpu);
put_cluster_clk_and_freq_table(cpu_dev);
dev_dbg(cpu_dev, "%s: Exited, cpu: %d\n", __func__, policy->cpu);

Expand Down
1 change: 0 additions & 1 deletion drivers/cpufreq/blackfin-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ static struct cpufreq_driver bfin_driver = {
.target_index = bfin_target,
.get = bfin_getfreq_khz,
.init = __bfin_cpu_init,
.exit = cpufreq_generic_exit,
.name = "bfin cpufreq",
.attr = cpufreq_generic_attr,
};
Expand Down
1 change: 0 additions & 1 deletion drivers/cpufreq/cpufreq-cpu0.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ static struct cpufreq_driver cpu0_cpufreq_driver = {
.target_index = cpu0_set_target,
.get = cpufreq_generic_get,
.init = cpu0_cpufreq_init,
.exit = cpufreq_generic_exit,
.name = "generic_cpu0",
.attr = cpufreq_generic_attr,
};
Expand Down
Loading

0 comments on commit 15afee3

Please sign in to comment.