diff options
author | John Scheible <johnscheible@google.com> | 2021-10-26 13:45:19 -0700 |
---|---|---|
committer | John Scheible <johnscheible@google.com> | 2021-10-28 16:14:12 -0700 |
commit | de16475969ca7dfaecf7144ece32b929cf193861 (patch) | |
tree | 962335a74133193541bf8c398a7cdf445f79a610 /Makefile | |
parent | 497cbdab5ea4f505beac7bb6d686bb4c3c504e8c (diff) | |
download | gs201-de16475969ca7dfaecf7144ece32b929cf193861.tar.gz |
gxp: First import from development branch
Squash at commit 48fe5786f1779890538d14f709b26063698c3711
Signed-off-by: John Scheible <johnscheible@google.com>
Change-Id: I208434dddde40c08b9fc4d5da072ba10541992a2
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..77db0fb --- /dev/null +++ b/Makefile @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for GXP driver. +# + +obj-$(CONFIG_GXP) += gxp.o + +gxp-objs += \ + gxp-bpm.o \ + gxp-debug-dump.o \ + gxp-debugfs.o \ + gxp-doorbell.o \ + gxp-firmware.o \ + gxp-firmware-data.o \ + gxp-lpm.o \ + gxp-mailbox.o \ + gxp-mapping.o \ + gxp-platform.o \ + gxp-range-alloc.o \ + gxp-vd.o + +KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build +M ?= $(shell pwd) + +# If building via make directly, specify target platform by adding +# "GXP_PLATFORM=<target>" +# With one of the following values: +# - CLOUDRIPPER +# - ZEBU +# - IP_ZEBU +# Defaults to building for CLOUDRIPPER if not otherwise specified. +GXP_PLATFORM ?= CLOUDRIPPER + +# Default to using the HW mailbox and SysMMU +GXP_SW_MAILBOX ?= 0 +GXP_HAS_SYSMMU ?= 1 + +# Setup the linked mailbox implementation and definitions. +ifeq ($(GXP_SW_MAILBOX),1) + ccflags-y += -DCONFIG_GXP_USE_SW_MAILBOX + gxp-objs += gxp-sw-mailbox-driver.o +else + gxp-objs += gxp-hw-mailbox-driver.o +endif + +# Setup which version of the gxp-dma interface is used. +ifeq ($(GXP_HAS_SYSMMU),1) + ccflags-y += -DCONFIG_GXP_HAS_SYSMMU + gxp-objs += gxp-dma-iommu.o +else + gxp-objs += gxp-dma-rmem.o +endif + +ccflags-y += -DCONFIG_GXP_$(GXP_PLATFORM) + +KBUILD_OPTIONS += CONFIG_GXP=m + +modules modules_install clean: + $(MAKE) -C $(KERNEL_SRC) M=$(M) W=1 $(KBUILD_OPTIONS) $(@) |