MALI: utgard: upgrade DDK to r6p1-01rel0
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / arm / mali400 / mali / Kbuild
index ae42b53c8ad9afeb133a0aac2dd3a7c22bd14e49..3b74bd15cda114ebfce64ca3d902f7291de3eeae 100755 (executable)
@@ -44,6 +44,15 @@ ifneq ($(MALI_PLATFORM),)
                platform/$(MALI_PLATFORM)/mali_dvfs.o
 endif
 
+ifeq ($(MALI_PLATFORM_FILES),)
+ifeq ($(CONFIG_ARCH_EXYNOS4),y)
+EXTRA_DEFINES += -DMALI_FAKE_PLATFORM_DEVICE=1
+export MALI_PLATFORM=exynos4
+export MALI_PLATFORM_FILES_BUILDIN = $(notdir $(wildcard $(src)/platform/$(MALI_PLATFORM)/*.c))
+export MALI_PLATFORM_FILES_ADD_PREFIX = $(addprefix platform/$(MALI_PLATFORM)/,$(MALI_PLATFORM_FILES_BUILDIN)) 
+endif
+endif
+
 mali-y += \
        linux/mali_osk_atomics.o \
        linux/mali_osk_irq.o \
@@ -80,6 +89,10 @@ mali-y += \
        linux/mali_ukk_soft_job.o \
        linux/mali_ukk_timeline.o
 
+mali-$(CONFIG_MALI_DEVFREQ) += \
+       linux/mali_devfreq.o \
+       common/mali_pm_metrics.o
+
 # Source files which always are included in a build
 mali-y += \
        common/mali_kernel_core.o \
@@ -118,10 +131,18 @@ mali-y += \
        linux/mali_pmu_power_up_down.o \
        __malidrv_build_info.o
 
+ifneq ($(wildcard $(src)/linux/mali_slp_global_lock.c),)
+       mali-y += linux/mali_slp_global_lock.o
+endif
+
 ifneq ($(MALI_PLATFORM_FILES),)
        mali-y += $(MALI_PLATFORM_FILES:.c=.o)
 endif
 
+ifneq ($(MALI_PLATFORM_FILES_ADD_PREFIX),)
+       mali-y += $(MALI_PLATFORM_FILES_ADD_PREFIX:.c=.o)
+endif
+
 mali-$(CONFIG_MALI400_PROFILING) += linux/mali_ukk_profiling.o
 mali-$(CONFIG_MALI400_PROFILING) += linux/mali_osk_profiling.o
 
@@ -129,6 +150,7 @@ mali-$(CONFIG_MALI400_INTERNAL_PROFILING) += linux/mali_profiling_internal.o tim
 ccflags-$(CONFIG_MALI400_INTERNAL_PROFILING) += -I$(src)/timestamp-$(TIMESTAMP)
 
 mali-$(CONFIG_DMA_SHARED_BUFFER) += linux/mali_memory_dma_buf.o
+mali-$(CONFIG_DMA_SHARED_BUFFER) += linux/mali_memory_secure.o
 mali-$(CONFIG_SYNC) += linux/mali_sync.o
 ccflags-$(CONFIG_SYNC) += -Idrivers/staging/android
 
@@ -154,7 +176,12 @@ ifeq ($(MALI_UPPER_HALF_SCHEDULING),1)
        ccflags-y += -DMALI_UPPER_HALF_SCHEDULING
 endif
 
+#build-in include path is different
+ifeq ($(MALI_PLATFORM_FILES),)
+ccflags-$(CONFIG_MALI400_UMP) += -I$(src)/../ump/include/
+else
 ccflags-$(CONFIG_MALI400_UMP) += -I$(src)/../../ump/include/ump
+endif
 ccflags-$(CONFIG_MALI400_DEBUG) += -DDEBUG
 
 # Use our defines when compiling