diff options
author | Sang-Hun Lee <sanlee@nvidia.com> | 2014-03-14 18:07:35 -0700 |
---|---|---|
committer | Manish Tuteja <mtuteja@nvidia.com> | 2014-03-15 14:55:04 -0700 |
commit | 09a8fb3d73d276c98db34dc9e4a521f8c24bfc32 (patch) | |
tree | 011d1bc6949bf140ead82aae54a2213b9dfcdb16 /arch | |
parent | 5feec650d32615e83eed55cbca0ab531a378eab1 (diff) |
ARM: tegra: boot with performance freq governor
- Set the CPU frequency governor to performance, once
DVFS and clock initialization is done
- Leave the initial CPU frequency governor to userspace,
as initially CL-DVFS is not ready, thus the system is
already at the highest frequency
Bug 1458081
Change-Id: I29f3a023513e87d3c7411bda6daaf4000517fc72
Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/382295
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Manish Tuteja <mtuteja@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/Kconfig | 12 | ||||
-rw-r--r-- | arch/arm/mach-tegra/cpu-tegra.c | 22 |
2 files changed, 33 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index 90fea2d8d4e8..ce42f9039013 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -334,6 +334,7 @@ config MACH_ROTH depends on ARCH_TEGRA_11x_SOC select MACH_HAS_SND_SOC_TEGRA_RT5639 if SND_SOC select MACH_HAS_SND_SOC_TEGRA_RT5640 if SND_SOC + select TEGRA_CPU_FREQ_GOVERNOR_EARLY_INIT help Support for NVIDIA THOR development platform @@ -618,6 +619,17 @@ config TEGRA_GADGET_BOOST_CPU_FREQ zero boosting frequency will not be enabled. This value will be used only by usb gadget driver. +config TEGRA_CPU_FREQ_GOVERNOR_EARLY_INIT + bool "Initialize CPU governor to a performance after DVFS initialization" + default 0 + help + During a boot up, once DVFS is initialized, there is a period of + time in which the frequency could adjusted higher before the userspace + configures the governor by using a more performance governor for + a faster boot up. Selecting this option will make the system to choose + a performance governor once the DVFS initialization is complete. Userspace + or init script can override the governor chosen here. + config TEGRA_DYNAMIC_PWRDET bool "Enable dynamic activation of IO level auto-detection" depends on TEGRA_SILICON_PLATFORM diff --git a/arch/arm/mach-tegra/cpu-tegra.c b/arch/arm/mach-tegra/cpu-tegra.c index ede69d7b4c8d..5d8035dbe841 100644 --- a/arch/arm/mach-tegra/cpu-tegra.c +++ b/arch/arm/mach-tegra/cpu-tegra.c @@ -7,7 +7,7 @@ * Colin Cross <ccross@google.com> * Based on arch/arm/plat-omap/cpu-omap.c, (C) 2005 Nokia Corporation * - * Copyright (C) 2010-2013 NVIDIA CORPORATION. All rights reserved. + * Copyright (C) 2010-2014 NVIDIA CORPORATION. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -877,6 +877,26 @@ static int __init tegra_cpufreq_init(void) return cpufreq_register_driver(&tegra_cpufreq_driver); } +#if CONFIG_TEGRA_CPU_FREQ_GOVERNOR_EARLY_INIT +static int __init tegra_cpufreq_governor_init(void) +{ + /* + * At this point, the full range of clocks should be available + * Set the CPU governor to performance for a faster boot up + */ + unsigned int i; + static char *start_scaling_governor = "performance"; + for_each_online_cpu(i) { + if (cpufreq_set_gov(start_scaling_governor, i)) + pr_info("Failed to set the governor to %s " \ + "for cpu %u\n", start_scaling_governor, i); + } + return 0; +} + +late_initcall_sync(tegra_cpufreq_governor_init); +#endif + static void __exit tegra_cpufreq_exit(void) { tegra_throttle_exit(); |