summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/gator/Kconfig26
-rw-r--r--drivers/gator/Makefile10
2 files changed, 33 insertions, 3 deletions
diff --git a/drivers/gator/Kconfig b/drivers/gator/Kconfig
index 4cd6a7c0116..14b3d619d18 100644
--- a/drivers/gator/Kconfig
+++ b/drivers/gator/Kconfig
@@ -5,3 +5,29 @@ config GATOR
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 d6dfeebf102..5b3ed4d31ee 100644
--- a/drivers/gator/Makefile
+++ b/drivers/gator/Makefile
@@ -16,13 +16,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 \