ARM: tegra: cpuidle: using IS_ENABLED for multi SoCs management in init func
Clean up the Tegra CPUidle init function by using IS_ENABLED for multi SoCs management in the init function. Signed-off-by: Joseph Lo <josephl@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
parent
bf91add4a0
commit
b046a65f23
|
@ -31,15 +31,16 @@ void __init tegra_cpuidle_init(void)
|
||||||
{
|
{
|
||||||
switch (tegra_chip_id) {
|
switch (tegra_chip_id) {
|
||||||
case TEGRA20:
|
case TEGRA20:
|
||||||
tegra20_cpuidle_init();
|
if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC))
|
||||||
|
tegra20_cpuidle_init();
|
||||||
break;
|
break;
|
||||||
case TEGRA30:
|
case TEGRA30:
|
||||||
tegra30_cpuidle_init();
|
if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC))
|
||||||
|
tegra30_cpuidle_init();
|
||||||
break;
|
break;
|
||||||
case TEGRA114:
|
case TEGRA114:
|
||||||
tegra114_cpuidle_init();
|
if (IS_ENABLED(CONFIG_ARCH_TEGRA_114_SOC))
|
||||||
break;
|
tegra114_cpuidle_init();
|
||||||
default:
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,25 +17,10 @@
|
||||||
#ifndef __MACH_TEGRA_CPUIDLE_H
|
#ifndef __MACH_TEGRA_CPUIDLE_H
|
||||||
#define __MACH_TEGRA_CPUIDLE_H
|
#define __MACH_TEGRA_CPUIDLE_H
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_TEGRA_2x_SOC
|
|
||||||
int tegra20_cpuidle_init(void);
|
|
||||||
#else
|
|
||||||
static inline int tegra20_cpuidle_init(void) { return -ENODEV; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_TEGRA_3x_SOC
|
|
||||||
int tegra30_cpuidle_init(void);
|
|
||||||
#else
|
|
||||||
static inline int tegra30_cpuidle_init(void) { return -ENODEV; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_TEGRA_114_SOC
|
|
||||||
int tegra114_cpuidle_init(void);
|
|
||||||
#else
|
|
||||||
static inline int tegra114_cpuidle_init(void) { return -ENODEV; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_CPU_IDLE
|
#ifdef CONFIG_CPU_IDLE
|
||||||
|
int tegra20_cpuidle_init(void);
|
||||||
|
int tegra30_cpuidle_init(void);
|
||||||
|
int tegra114_cpuidle_init(void);
|
||||||
void tegra_cpuidle_init(void);
|
void tegra_cpuidle_init(void);
|
||||||
#else
|
#else
|
||||||
static inline void tegra_cpuidle_init(void) {}
|
static inline void tegra_cpuidle_init(void) {}
|
||||||
|
|
Loading…
Reference in New Issue