summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorScott Williams <scwilliams@nvidia.com>2012-02-02 18:55:00 -0800
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-02-13 07:04:59 -0800
commit70d7047993252be0014593f6b7dfc5c2f31e6b52 (patch)
tree9e1193937b8c97acb14e441200cb7988a8847155 /arch
parent2b4ee6d7eae39d7805a30fbfcfdeaeb0e32cc719 (diff)
ARM: tegra: Clean up CACHE_L2X0 conditionals and includes
Change-Id: I9862e73f264c757f97aaad03f3373fb1d3e95462 Signed-off-by: Scott Williams <scwilliams@nvidia.com> Reviewed-on: http://git-master/r/79138 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board.h8
-rw-r--r--arch/arm/mach-tegra/common.c8
-rw-r--r--arch/arm/mach-tegra/pm.c5
-rw-r--r--arch/arm/mach-tegra/reset.c3
4 files changed, 13 insertions, 11 deletions
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h
index fc22b76160f9..2fbafc8084cc 100644
--- a/arch/arm/mach-tegra/board.h
+++ b/arch/arm/mach-tegra/board.h
@@ -2,7 +2,7 @@
* arch/arm/mach-tegra/board.h
*
* Copyright (C) 2010 Google, Inc.
- * Copyright (C) 2011 NVIDIA Corporation.
+ * Copyright (C) 2011-2012 NVIDIA Corporation.
*
* Author:
* Colin Cross <ccross@google.com>
@@ -44,7 +44,13 @@ void __init tegra_init_irq(void);
void __init tegra_init_clock(void);
void __init tegra_reserve(unsigned long carveout_size, unsigned long fb_size,
unsigned long fb2_size);
+/* FIXME: The following needs to move common.h when arm_soc_desc is
+ introduced in a future version of the kernel */
+#ifdef CONFIG_CACHE_L2X0
void tegra_init_cache(bool init);
+#else
+static inline void tegra_init_cache(bool init) {}
+#endif
void __init tegra_ram_console_debug_reserve(unsigned long ram_console_size);
void __init tegra_ram_console_debug_init(void);
void __init tegra_release_bootloader_fb(void);
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index cfae2bc1c12e..ae18a18623f9 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -195,7 +195,8 @@ static __initdata struct tegra_clk_init_table common_clk_init_table[] = {
{ NULL, NULL, 0, 0},
};
-#if defined(CONFIG_TRUSTED_FOUNDATIONS) && defined(CONFIG_CACHE_L2X0)
+#ifdef CONFIG_CACHE_L2X0
+#ifdef CONFIG_TRUSTED_FOUNDATIONS
static void tegra_cache_smc(bool enable, u32 arg)
{
void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000;
@@ -264,11 +265,10 @@ static void tegra_l2x0_disable(void)
tegra_cache_smc(false, l2x0_way_mask);
local_irq_restore(flags);
}
-#endif /* CONFIG_TRUSTED_FOUNDATIONS && defined(CONFIG_CACHE_L2X0) */
+#endif /* CONFIG_TRUSTED_FOUNDATIONS */
void tegra_init_cache(bool init)
{
-#ifdef CONFIG_CACHE_L2X0
void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000;
u32 aux_ctrl;
u32 speedo;
@@ -329,8 +329,8 @@ void tegra_init_cache(bool init)
}
l2x0_enable();
#endif
-#endif
}
+#endif
static void __init tegra_init_power(void)
{
diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c
index 23ff9e0ac93a..98903f7365ee 100644
--- a/arch/arm/mach-tegra/pm.c
+++ b/arch/arm/mach-tegra/pm.c
@@ -3,7 +3,7 @@
*
* CPU complex suspend & resume functions for Tegra SoCs
*
- * Copyright (c) 2009-2011, NVIDIA Corporation.
+ * Copyright (c) 2009-2012, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -46,7 +46,6 @@
#include <asm/cacheflush.h>
#include <asm/cpu_pm.h>
-#include <asm/hardware/cache-l2x0.h>
#include <asm/hardware/gic.h>
#include <asm/localtimer.h>
#include <asm/pgalloc.h>
@@ -620,9 +619,7 @@ unsigned int tegra_idle_lp2_last(unsigned int sleep_time, unsigned int flags)
tegra_sleep_cpu(PLAT_PHYS_OFFSET - PAGE_OFFSET);
-#ifdef CONFIG_CACHE_L2X0
tegra_init_cache(false);
-#endif
tegra_cluster_switch_time(flags, tegra_cluster_switch_time_id_switch);
restore_cpu_complex(mode);
cpu_complex_pm_exit();
diff --git a/arch/arm/mach-tegra/reset.c b/arch/arm/mach-tegra/reset.c
index c44a3de07873..3ab2c132d629 100644
--- a/arch/arm/mach-tegra/reset.c
+++ b/arch/arm/mach-tegra/reset.c
@@ -1,7 +1,7 @@
/*
* arch/arm/mach-tegra/reset.c
*
- * Copyright (C) 2011 NVIDIA Corporation.
+ * Copyright (C) 2011-2012 NVIDIA Corporation.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
@@ -20,7 +20,6 @@
#include <linux/bitops.h>
#include <asm/cacheflush.h>
-#include <asm/hardware/cache-l2x0.h>
#include <mach/iomap.h>