summaryrefslogtreecommitdiff
path: root/drivers/misc/tegra-profiler
diff options
context:
space:
mode:
authorMatt Craighead <mcraighead@nvidia.com>2013-09-20 13:28:42 -0500
committerAjay Nandakumar <anandakumarm@nvidia.com>2013-10-01 13:40:03 +0530
commit395d154ab8828490184428ec6819c51f2f4f61d1 (patch)
tree6ca601a8d1ddbe699060a97f6f6a2e139abf6696 /drivers/misc/tegra-profiler
parentf8377362ee2547d3986da10c3d886acce9e57384 (diff)
misc: tegra-profiler: guard pl310 with kernel config
Don't attempt to access the PL310 unless the kernel config indicates that it exists. Change-Id: I07eeb0eead095ecd0f3caa36393fce1697b87d56 Signed-off-by: Matt Craighead <mcraighead@nvidia.com> Reviewed-on: http://git-master/r/277313 Reviewed-by: Edgardo Handal <ehandal@nvidia.com> Tested-by: Edgardo Handal <ehandal@nvidia.com> Reviewed-by: Allen Martin <amartin@nvidia.com> (cherry picked from commit 023737d7ca069684172e70f979784d9f344bfcb3) Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Diffstat (limited to 'drivers/misc/tegra-profiler')
-rw-r--r--drivers/misc/tegra-profiler/pl310.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/misc/tegra-profiler/pl310.c b/drivers/misc/tegra-profiler/pl310.c
index 010830823817..fe5b4937336d 100644
--- a/drivers/misc/tegra-profiler/pl310.c
+++ b/drivers/misc/tegra-profiler/pl310.c
@@ -282,6 +282,7 @@ static struct quadd_event_source_interface l2x0_int = {
struct quadd_event_source_interface *quadd_l2x0_events_init(void)
{
+#ifdef CONFIG_CACHE_L2X0
void __iomem *base;
unsigned long phys_addr;
@@ -314,4 +315,7 @@ struct quadd_event_source_interface *quadd_l2x0_events_init(void)
pr_debug("pl310 init success, l2x0_base: %p\n", base);
return &l2x0_int;
+#else /* CONFIG_CACHE_L2X0 */
+ return NULL;
+#endif /* CONFIG_CACHE_L2X0 */
}