From 2531d589f5313f9e953cb2b225395b4e1e54593a Mon Sep 17 00:00:00 2001 From: Jon Medhurst Date: Tue, 17 Apr 2012 16:22:24 +0100 Subject: gator: Add config options for Mali support Signed-off-by: Jon Medhurst --- drivers/gator/Kconfig | 26 ++++++++++++++++++++++++++ drivers/gator/Makefile | 10 +++++++--- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/drivers/gator/Kconfig b/drivers/gator/Kconfig index 4cd6a7c01168..14b3d619d185 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 d6dfeebf102a..5b3ed4d31eee 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 \ -- cgit v1.2.3