Skip to content

Commit 1f3e18e

Browse files
digetxthierryreding
authored andcommitted
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>
1 parent 7741868 commit 1f3e18e

6 files changed

Lines changed: 26 additions & 26 deletions

File tree

‎arch/arm/mach-tegra/cpuidle-tegra114.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ static int tegra114_idle_power_down(struct cpuidle_device *dev,
3535
{
3636
local_fiq_disable();
3737

38-
tegra_set_cpu_in_lp2();
38+
tegra_pm_set_cpu_in_lp2();
3939
cpu_pm_enter();
4040

4141
call_firmware_op(prepare_idle, TF_PM_MODE_LP2_NOFLUSH_L2);
4242

4343
/* Do suspend by ourselves if the firmware does not implement it */
4444
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);
4646

4747
cpu_pm_exit();
48-
tegra_clear_cpu_in_lp2();
48+
tegra_pm_clear_cpu_in_lp2();
4949

5050
local_fiq_enable();
5151

‎arch/arm/mach-tegra/cpuidle-tegra20.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static bool tegra20_cpu_cluster_power_down(struct cpuidle_device *dev,
9191
while (!tegra_cpu_rail_off_ready())
9292
cpu_relax();
9393

94-
ret = !tegra_idle_lp2_last();
94+
ret = !tegra_pm_enter_lp2();
9595

9696
if (cpu_online(1))
9797
tegra20_wake_cpu1_from_reset();
@@ -136,7 +136,7 @@ static int tegra20_idle_lp2_coupled(struct cpuidle_device *dev,
136136

137137
local_fiq_disable();
138138

139-
tegra_set_cpu_in_lp2();
139+
tegra_pm_set_cpu_in_lp2();
140140
cpu_pm_enter();
141141

142142
if (dev->cpu == 0)
@@ -145,7 +145,7 @@ static int tegra20_idle_lp2_coupled(struct cpuidle_device *dev,
145145
entered_lp2 = tegra20_idle_enter_lp2_cpu_1(dev, drv, index);
146146

147147
cpu_pm_exit();
148-
tegra_clear_cpu_in_lp2();
148+
tegra_pm_clear_cpu_in_lp2();
149149

150150
local_fiq_enable();
151151

‎arch/arm/mach-tegra/cpuidle-tegra30.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static bool tegra30_cpu_cluster_power_down(struct cpuidle_device *dev,
6969
return false;
7070
}
7171

72-
return !tegra_idle_lp2_last();
72+
return !tegra_pm_enter_lp2();
7373
}
7474

7575
#ifdef CONFIG_SMP
@@ -79,7 +79,7 @@ static bool tegra30_cpu_core_power_down(struct cpuidle_device *dev,
7979
{
8080
smp_wmb();
8181

82-
cpu_suspend(0, tegra30_sleep_cpu_secondary_finish);
82+
cpu_suspend(0, tegra30_pm_secondary_cpu_suspend);
8383

8484
return true;
8585
}
@@ -100,7 +100,7 @@ static int tegra30_idle_lp2(struct cpuidle_device *dev,
100100

101101
local_fiq_disable();
102102

103-
tegra_set_cpu_in_lp2();
103+
tegra_pm_set_cpu_in_lp2();
104104
cpu_pm_enter();
105105

106106
if (dev->cpu == 0)
@@ -109,7 +109,7 @@ static int tegra30_idle_lp2(struct cpuidle_device *dev,
109109
entered_lp2 = tegra30_cpu_core_power_down(dev, drv, index);
110110

111111
cpu_pm_exit();
112-
tegra_clear_cpu_in_lp2();
112+
tegra_pm_clear_cpu_in_lp2();
113113

114114
local_fiq_enable();
115115

‎arch/arm/mach-tegra/pm.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ static void suspend_cpu_complex(void)
110110
flowctrl_cpu_suspend_enter(cpu);
111111
}
112112

113-
void tegra_clear_cpu_in_lp2(void)
113+
void tegra_pm_clear_cpu_in_lp2(void)
114114
{
115115
int phy_cpu_id = cpu_logical_map(smp_processor_id());
116116
u32 *cpu_in_lp2 = tegra_cpu_lp2_mask;
@@ -123,7 +123,7 @@ void tegra_clear_cpu_in_lp2(void)
123123
spin_unlock(&tegra_lp2_lock);
124124
}
125125

126-
void tegra_set_cpu_in_lp2(void)
126+
void tegra_pm_set_cpu_in_lp2(void)
127127
{
128128
int phy_cpu_id = cpu_logical_map(smp_processor_id());
129129
u32 *cpu_in_lp2 = tegra_cpu_lp2_mask;
@@ -189,7 +189,7 @@ static void tegra_pm_set(enum tegra_suspend_mode mode)
189189
tegra_pmc_enter_suspend_mode(mode);
190190
}
191191

192-
int tegra_idle_lp2_last(void)
192+
int tegra_pm_enter_lp2(void)
193193
{
194194
int err;
195195

@@ -356,7 +356,7 @@ static int tegra_suspend_enter(suspend_state_t state)
356356
tegra_suspend_enter_lp1();
357357
break;
358358
case TEGRA_SUSPEND_LP2:
359-
tegra_set_cpu_in_lp2();
359+
tegra_pm_set_cpu_in_lp2();
360360
break;
361361
default:
362362
break;
@@ -377,7 +377,7 @@ static int tegra_suspend_enter(suspend_state_t state)
377377
tegra_suspend_exit_lp1();
378378
break;
379379
case TEGRA_SUSPEND_LP2:
380-
tegra_clear_cpu_in_lp2();
380+
tegra_pm_clear_cpu_in_lp2();
381381
break;
382382
default:
383383
break;

‎arch/arm/mach-tegra/sleep-tegra30.S‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,11 @@ ENTRY(tegra30_sleep_core_finish)
265265
ENDPROC(tegra30_sleep_core_finish)
266266

267267
/*
268-
* tegra30_sleep_cpu_secondary_finish(unsigned long v2p)
268+
* tegra30_pm_secondary_cpu_suspend(unsigned long unused_arg)
269269
*
270270
* Enters LP2 on secondary CPU by exiting coherency and powergating the CPU.
271271
*/
272-
ENTRY(tegra30_sleep_cpu_secondary_finish)
272+
ENTRY(tegra30_pm_secondary_cpu_suspend)
273273
mov r7, lr
274274

275275
/* Flush and disable the L1 data cache */
@@ -281,7 +281,7 @@ ENTRY(tegra30_sleep_cpu_secondary_finish)
281281
bl tegra30_cpu_shutdown
282282
mov r0, #1 @ never return here
283283
ret r7
284-
ENDPROC(tegra30_sleep_cpu_secondary_finish)
284+
ENDPROC(tegra30_pm_secondary_cpu_suspend)
285285

286286
/*
287287
* tegra30_tear_down_cpu

‎include/soc/tegra/pm.h‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ tegra_pm_validate_suspend_mode(enum tegra_suspend_mode mode);
2323
/* low-level resume entry point */
2424
void tegra_resume(void);
2525

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);
3030
int tegra_pm_park_secondary_cpu(unsigned long cpu);
3131
#else
3232
static inline enum tegra_suspend_mode
@@ -39,20 +39,20 @@ static inline void tegra_resume(void)
3939
{
4040
}
4141

42-
static inline int tegra30_sleep_cpu_secondary_finish(unsigned long arg)
42+
static inline int tegra30_pm_secondary_cpu_suspend(unsigned long arg)
4343
{
4444
return -ENOTSUPP;
4545
}
4646

47-
static inline void tegra_clear_cpu_in_lp2(void)
47+
static inline void tegra_pm_clear_cpu_in_lp2(void)
4848
{
4949
}
5050

51-
static inline void tegra_set_cpu_in_lp2(void)
51+
static inline void tegra_pm_set_cpu_in_lp2(void)
5252
{
5353
}
5454

55-
static inline int tegra_idle_lp2_last(void)
55+
static inline int tegra_pm_enter_lp2(void)
5656
{
5757
return -ENOTSUPP;
5858
}

0 commit comments

Comments
 (0)