diff options
author | Scott Williams <scwilliams@nvidia.com> | 2010-07-14 12:26:21 -0700 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-07-17 10:04:32 -0700 |
commit | 0e1376cae92ef30fbd48da8f4eaf5819e54fd3cd (patch) | |
tree | ebc58e5e73bcfac0f7278e1edb479af7a7211eaa /arch | |
parent | 32a8ef0076f7f31de541dcb1f68e9f8b2c70de4a (diff) |
tegra: Clean up CONFIG_PM and CONFIG_HOTPLUG_CPU conditionals
Change-Id: Iccd36cbf7eb5c159ece1ea0e720841648dd8aa82
Reviewed-on: http://git-master/r/3945
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Tested-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/common/gic.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/platsmp.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-tegra/suspend.c | 17 |
3 files changed, 17 insertions, 8 deletions
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index 728d4385e057..c8afaa9320ff 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c @@ -227,7 +227,6 @@ static unsigned int _gic_dist_init(unsigned int gic_nr) return max_irq; } -#ifdef CONFIG_PM void gic_dist_restore(unsigned int gic_nr) { unsigned int max_irq, i; @@ -251,7 +250,6 @@ void gic_dist_restore(unsigned int gic_nr) } } -#endif void __init gic_dist_init(unsigned int gic_nr, void __iomem *base, diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c index 547b2a3bf557..20843cd1206e 100644 --- a/arch/arm/mach-tegra/platsmp.c +++ b/arch/arm/mach-tegra/platsmp.c @@ -64,7 +64,9 @@ const struct cpumask *const cpu_init_mask = to_cpumask(cpu_init_bits); (IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x344) unsigned long tegra_pgd_phys; /* pgd used by hotplug & LP2 bootup */ +#if defined(CONFIG_PM) || defined(CONFIG_HOTPLUG_CPU) static pgd_t *tegra_pgd; +#endif void *tegra_context_area = NULL; void __cpuinit platform_secondary_init(unsigned int cpu) @@ -157,6 +159,7 @@ void __init smp_init_cpus(void) cpu_set(i, cpu_possible_map); } +#if defined(CONFIG_PM) || defined(CONFIG_HOTPLUG_CPU) static int create_suspend_pgtable(void) { int i; @@ -211,6 +214,7 @@ static int create_suspend_pgtable(void) return 0; } +#endif void __init smp_prepare_cpus(unsigned int max_cpus) { @@ -226,12 +230,14 @@ void __init smp_prepare_cpus(unsigned int max_cpus) if (max_cpus > ncores) max_cpus = ncores; +#if defined(CONFIG_PM) || defined(CONFIG_HOTPLUG_CPU) tegra_context_area = kzalloc(512 * ncores, GFP_KERNEL); if (tegra_context_area && create_suspend_pgtable()) { kfree(tegra_context_area); tegra_context_area = NULL; } +#endif /* * Initialise the present map, which describes the set of CPUs diff --git a/arch/arm/mach-tegra/suspend.c b/arch/arm/mach-tegra/suspend.c index 8024069aa5ee..23a401e95a60 100644 --- a/arch/arm/mach-tegra/suspend.c +++ b/arch/arm/mach-tegra/suspend.c @@ -66,6 +66,7 @@ struct suspend_context volatile struct suspend_context tegra_sctx; +#ifdef CONFIG_HOTPLUG_CPU extern void tegra_board_nvodm_suspend(void); extern void tegra_board_nvodm_resume(void); @@ -74,6 +75,7 @@ static void __iomem *clk_rst = IO_ADDRESS(TEGRA_CLK_RESET_BASE); static void __iomem *flow_ctrl = IO_ADDRESS(TEGRA_FLOW_CTRL_BASE); static void __iomem *evp_reset = IO_ADDRESS(TEGRA_EXCEPTION_VECTORS_BASE)+0x100; static void __iomem *tmrus = IO_ADDRESS(TEGRA_TMRUS_BASE); +#endif #define PMC_CTRL 0x0 #define PMC_CTRL_LATCH_WAKEUPS (1 << 5) @@ -128,6 +130,7 @@ bool tegra_nvrm_lp2_allowed(void) return ret_value; } +#ifdef CONFIG_HOTPLUG_CPU static bool tegra_nvrm_lp2_persist(void) { bool ret_value = true; @@ -231,9 +234,6 @@ static noinline void restore_cpu_complex(bool wait_plls) enable_irq(INT_SYS_STATS_MON); } -extern unsigned long tegra_pgd_phys; -extern unsigned int s_AvpWarmbootEntry; - static noinline void suspend_cpu_complex(void) { unsigned int reg; @@ -325,8 +325,11 @@ unsigned int tegra_suspend_lp2(unsigned int us) #endif return lp2time; } +#endif -#ifdef CONFIG_PM +#ifdef CONFIG_PM + +extern unsigned int s_AvpWarmbootEntry; /* ensures that sufficient time is passed for a register write to * serialize into the 32KHz domain */ @@ -620,6 +623,8 @@ static void tegra_suspend_wake(void) #endif } +extern void __init lp0_suspend_init(void); + extern void tegra_pinmux_suspend(void); extern void tegra_irq_suspend(void); extern void tegra_gpio_suspend(void); @@ -704,8 +709,6 @@ static struct platform_suspend_ops tegra_suspend_ops = { .wake = tegra_suspend_wake, .enter = tegra_suspend_enter, }; - -extern void __init lp0_suspend_init(void); #endif void __init tegra_init_suspend(struct tegra_suspend_platform_data *plat) @@ -767,7 +770,9 @@ void __init tegra_init_suspend(struct tegra_suspend_platform_data *plat) #endif } +#ifdef CONFIG_PM void tegra_configure_dpd_kbc(unsigned int kbc_rows, unsigned int kbc_cols) { writel((kbc_rows & 0xFFFF), pmc + PMC_DPAD_ORIDE); } +#endif |