aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2012-05-10 17:35:03 +0100
committerJon Medhurst <tixy@linaro.org>2012-07-16 14:21:40 +0100
commit6bedd90b2e8cfc1b2fd1a38bfae383ee25a0f07f (patch)
treeb4f532fee37d90d29ccafac19f3d6b5fc04c1ec5 /drivers
parented5f30af0cfe921a0bd5578db01c2ab092c22786 (diff)
gator: Add config for building the module in-tree
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/Kconfig2
-rw-r--r--drivers/Makefile2
-rw-r--r--drivers/gator/Kconfig33
-rw-r--r--drivers/gator/Makefile14
4 files changed, 46 insertions, 5 deletions
diff --git a/drivers/Kconfig b/drivers/Kconfig
index bfc918633fd9..552e0b3c8127 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -148,4 +148,6 @@ source "drivers/iio/Kconfig"
source "drivers/vme/Kconfig"
+source "drivers/gator/Kconfig"
+
endmenu
diff --git a/drivers/Makefile b/drivers/Makefile
index 2ba29ffef2cb..c65b02b7eed8 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -137,3 +137,5 @@ obj-$(CONFIG_EXTCON) += extcon/
obj-$(CONFIG_MEMORY) += memory/
obj-$(CONFIG_IIO) += iio/
obj-$(CONFIG_VME_BUS) += vme/
+
+obj-$(CONFIG_GATOR) += gator/
diff --git a/drivers/gator/Kconfig b/drivers/gator/Kconfig
new file mode 100644
index 000000000000..14b3d619d185
--- /dev/null
+++ b/drivers/gator/Kconfig
@@ -0,0 +1,33 @@
+config GATOR
+ tristate "Gator module for ARM's Streamline Performance Analyzer"
+ default m
+ depends on PROFILING
+ depends on HIGH_RES_TIMERS
+ depends on LOCAL_TIMERS || !(ARM && SMP)
+ select TRACING
+
+config GATOR_WITH_MALI_SUPPORT
+ bool
+
+choice
+ prompt "Enable Mali GPU support in Gator"
+ depends on GATOR
+ optional
+
+config GATOR_MALI_400MP
+ bool "Mali-400MP"
+ select GATOR_WITH_MALI_SUPPORT
+
+config GATOR_MALI_T6XX
+ bool "Mali-T604 or Mali-T658"
+ select GATOR_WITH_MALI_SUPPORT
+
+endchoice
+
+config GATOR_MALI_PATH
+ string "Path to Mali driver"
+ depends on GATOR_WITH_MALI_SUPPORT
+ default "drivers/gpu/arm/mali400mp"
+ help
+ The gator code adds this to its include path so it can get the Mali
+ trace headers with: #include "linux/mali_linux_trace.h"
diff --git a/drivers/gator/Makefile b/drivers/gator/Makefile
index 667637e50c48..5f4ab48452e4 100644
--- a/drivers/gator/Makefile
+++ b/drivers/gator/Makefile
@@ -3,7 +3,7 @@ ifneq ($(KERNELRELEASE),)
# Uncomment the following line to enable kernel stack unwinding within gator, or update gator_backtrace.c
# EXTRA_CFLAGS += -DGATOR_KERNEL_STACK_UNWINDING
-obj-m := gator.o
+obj-$(CONFIG_GATOR) := gator.o
gator-y := gator_main.o \
gator_events_irq.o \
@@ -15,13 +15,17 @@ gator-y := gator_main.o \
gator-y += gator_events_mmaped.o
-ifneq ($(GATOR_WITH_MALI_SUPPORT),)
-ifeq ($(GATOR_WITH_MALI_SUPPORT),MALI_T6xx)
+ifeq ($(CONFIG_GATOR_WITH_MALI_SUPPORT),y)
+
+ifeq ($(CONFIG_GATOR_MALI_T6XX),y)
gator-y += gator_events_mali_t6xx.o
else
gator-y += gator_events_mali.o
endif
-EXTRA_CFLAGS += -DMALI_SUPPORT=$(GATOR_WITH_MALI_SUPPORT)
+
+ccflags-y += -I$(CONFIG_GATOR_MALI_PATH)
+ccflags-$(CONFIG_GATOR_MALI_400MP) += -DMALI_SUPPORT=MALI_400
+ccflags-$(CONFIG_GATOR_MALI_T6XX) += -DMALI_SUPPORT=MALI_T6xx
endif
gator-$(CONFIG_ARM) += gator_events_armv6.o \
@@ -38,7 +42,7 @@ clean-files := gator_events.h
silent_chk_events.h = :
gator_events.h: FORCE
@$($(quiet)chk_events.h)
- $(Q)cd $(obj) ; $(CONFIG_SHELL) $(obj)/gator_events.sh $@
+ $(Q)cd $(srctree)/$(src) ; $(CONFIG_SHELL) gator_events.sh $(objtree)/$(obj)/$@
else