Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: tegra: Rename some of the newly exposed PM functions

Rename some of the recently exposed PM functions, prefixing them with
"tegra_pm_" in order to make the naming of the PM functions consistent.

Acked-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Tested-by: Peter Geis <pgwipeout@gmail.com>
Tested-by: Jasper Korten <jja2000@gmail.com>
Tested-by: David Heidelberg <david@ixit.cz>
Tested-by: Nicolas Chauvet <kwizart@gmail.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>

authored by

Dmitry Osipenko and committed by
Thierry Reding
1f3e18ec 7741868f

+26 -26
+3 -3
arch/arm/mach-tegra/cpuidle-tegra114.c
··· 35 35 { 36 36 local_fiq_disable(); 37 37 38 - tegra_set_cpu_in_lp2(); 38 + tegra_pm_set_cpu_in_lp2(); 39 39 cpu_pm_enter(); 40 40 41 41 call_firmware_op(prepare_idle, TF_PM_MODE_LP2_NOFLUSH_L2); 42 42 43 43 /* Do suspend by ourselves if the firmware does not implement it */ 44 44 if (call_firmware_op(do_idle, 0) == -ENOSYS) 45 - cpu_suspend(0, tegra30_sleep_cpu_secondary_finish); 45 + cpu_suspend(0, tegra30_pm_secondary_cpu_suspend); 46 46 47 47 cpu_pm_exit(); 48 - tegra_clear_cpu_in_lp2(); 48 + tegra_pm_clear_cpu_in_lp2(); 49 49 50 50 local_fiq_enable(); 51 51
+3 -3
arch/arm/mach-tegra/cpuidle-tegra20.c
··· 91 91 while (!tegra_cpu_rail_off_ready()) 92 92 cpu_relax(); 93 93 94 - ret = !tegra_idle_lp2_last(); 94 + ret = !tegra_pm_enter_lp2(); 95 95 96 96 if (cpu_online(1)) 97 97 tegra20_wake_cpu1_from_reset(); ··· 136 136 137 137 local_fiq_disable(); 138 138 139 - tegra_set_cpu_in_lp2(); 139 + tegra_pm_set_cpu_in_lp2(); 140 140 cpu_pm_enter(); 141 141 142 142 if (dev->cpu == 0) ··· 145 145 entered_lp2 = tegra20_idle_enter_lp2_cpu_1(dev, drv, index); 146 146 147 147 cpu_pm_exit(); 148 - tegra_clear_cpu_in_lp2(); 148 + tegra_pm_clear_cpu_in_lp2(); 149 149 150 150 local_fiq_enable(); 151 151
+4 -4
arch/arm/mach-tegra/cpuidle-tegra30.c
··· 69 69 return false; 70 70 } 71 71 72 - return !tegra_idle_lp2_last(); 72 + return !tegra_pm_enter_lp2(); 73 73 } 74 74 75 75 #ifdef CONFIG_SMP ··· 79 79 { 80 80 smp_wmb(); 81 81 82 - cpu_suspend(0, tegra30_sleep_cpu_secondary_finish); 82 + cpu_suspend(0, tegra30_pm_secondary_cpu_suspend); 83 83 84 84 return true; 85 85 } ··· 100 100 101 101 local_fiq_disable(); 102 102 103 - tegra_set_cpu_in_lp2(); 103 + tegra_pm_set_cpu_in_lp2(); 104 104 cpu_pm_enter(); 105 105 106 106 if (dev->cpu == 0) ··· 109 109 entered_lp2 = tegra30_cpu_core_power_down(dev, drv, index); 110 110 111 111 cpu_pm_exit(); 112 - tegra_clear_cpu_in_lp2(); 112 + tegra_pm_clear_cpu_in_lp2(); 113 113 114 114 local_fiq_enable(); 115 115
+5 -5
arch/arm/mach-tegra/pm.c
··· 110 110 flowctrl_cpu_suspend_enter(cpu); 111 111 } 112 112 113 - void tegra_clear_cpu_in_lp2(void) 113 + void tegra_pm_clear_cpu_in_lp2(void) 114 114 { 115 115 int phy_cpu_id = cpu_logical_map(smp_processor_id()); 116 116 u32 *cpu_in_lp2 = tegra_cpu_lp2_mask; ··· 123 123 spin_unlock(&tegra_lp2_lock); 124 124 } 125 125 126 - void tegra_set_cpu_in_lp2(void) 126 + void tegra_pm_set_cpu_in_lp2(void) 127 127 { 128 128 int phy_cpu_id = cpu_logical_map(smp_processor_id()); 129 129 u32 *cpu_in_lp2 = tegra_cpu_lp2_mask; ··· 189 189 tegra_pmc_enter_suspend_mode(mode); 190 190 } 191 191 192 - int tegra_idle_lp2_last(void) 192 + int tegra_pm_enter_lp2(void) 193 193 { 194 194 int err; 195 195 ··· 356 356 tegra_suspend_enter_lp1(); 357 357 break; 358 358 case TEGRA_SUSPEND_LP2: 359 - tegra_set_cpu_in_lp2(); 359 + tegra_pm_set_cpu_in_lp2(); 360 360 break; 361 361 default: 362 362 break; ··· 377 377 tegra_suspend_exit_lp1(); 378 378 break; 379 379 case TEGRA_SUSPEND_LP2: 380 - tegra_clear_cpu_in_lp2(); 380 + tegra_pm_clear_cpu_in_lp2(); 381 381 break; 382 382 default: 383 383 break;
+3 -3
arch/arm/mach-tegra/sleep-tegra30.S
··· 265 265 ENDPROC(tegra30_sleep_core_finish) 266 266 267 267 /* 268 - * tegra30_sleep_cpu_secondary_finish(unsigned long v2p) 268 + * tegra30_pm_secondary_cpu_suspend(unsigned long unused_arg) 269 269 * 270 270 * Enters LP2 on secondary CPU by exiting coherency and powergating the CPU. 271 271 */ 272 - ENTRY(tegra30_sleep_cpu_secondary_finish) 272 + ENTRY(tegra30_pm_secondary_cpu_suspend) 273 273 mov r7, lr 274 274 275 275 /* Flush and disable the L1 data cache */ ··· 281 281 bl tegra30_cpu_shutdown 282 282 mov r0, #1 @ never return here 283 283 ret r7 284 - ENDPROC(tegra30_sleep_cpu_secondary_finish) 284 + ENDPROC(tegra30_pm_secondary_cpu_suspend) 285 285 286 286 /* 287 287 * tegra30_tear_down_cpu
+8 -8
include/soc/tegra/pm.h
··· 23 23 /* low-level resume entry point */ 24 24 void tegra_resume(void); 25 25 26 - int tegra30_sleep_cpu_secondary_finish(unsigned long arg); 27 - void tegra_clear_cpu_in_lp2(void); 28 - void tegra_set_cpu_in_lp2(void); 29 - int tegra_idle_lp2_last(void); 26 + int tegra30_pm_secondary_cpu_suspend(unsigned long arg); 27 + void tegra_pm_clear_cpu_in_lp2(void); 28 + void tegra_pm_set_cpu_in_lp2(void); 29 + int tegra_pm_enter_lp2(void); 30 30 int tegra_pm_park_secondary_cpu(unsigned long cpu); 31 31 #else 32 32 static inline enum tegra_suspend_mode ··· 39 39 { 40 40 } 41 41 42 - static inline int tegra30_sleep_cpu_secondary_finish(unsigned long arg) 42 + static inline int tegra30_pm_secondary_cpu_suspend(unsigned long arg) 43 43 { 44 44 return -ENOTSUPP; 45 45 } 46 46 47 - static inline void tegra_clear_cpu_in_lp2(void) 47 + static inline void tegra_pm_clear_cpu_in_lp2(void) 48 48 { 49 49 } 50 50 51 - static inline void tegra_set_cpu_in_lp2(void) 51 + static inline void tegra_pm_set_cpu_in_lp2(void) 52 52 { 53 53 } 54 54 55 - static inline int tegra_idle_lp2_last(void) 55 + static inline int tegra_pm_enter_lp2(void) 56 56 { 57 57 return -ENOTSUPP; 58 58 }