You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
183 lines
6.5 KiB
183 lines
6.5 KiB
###############################################################################
|
|
# export variables
|
|
###############################################################################
|
|
ifeq ($(CONFIG_SOCT_KMOD_CFLAGS),)
|
|
ccflags-y += $(CONFIG_SOCT_KMOD_CFLAGS)
|
|
endif
|
|
|
|
###############################################################################
|
|
# local variables
|
|
###############################################################################
|
|
$(warning CFG_SOCT_SMMU_SUPPORT $(CFG_SOCT_SMMU_SUPPORT))
|
|
$(warning CONFIG_SOCT_SMMU_SUPPORT $(CONFIG_SOCT_SMMU_SUPPORT))
|
|
$(warning CONFIG_SOCT_TEE_SUPPORT $(CONFIG_SOCT_TEE_SUPPORT))
|
|
$(warning MODULE $(MODULE))
|
|
$(warning CONFIG_PRODUCT_TYPE $(CONFIG_PRODUCT_TYPE))
|
|
$(warning CONFIG_SOCT_DMCU_SUPPORT $(CONFIG_SOCT_DMCU_SUPPORT))
|
|
$(warning CONFIG_SOCT_MEMC_SUPPORT $(CONFIG_SOCT_MEMC_SUPPORT))
|
|
$(warning MODNAME $(MODNAME))
|
|
|
|
ifneq ($(findstring $(CONFIG_SOCT_CHIP_TYPE), "reserved13"),)
|
|
CONFIG_MEMC_ALG_V1=y
|
|
endif
|
|
|
|
ifneq ($(findstring $(CONFIG_SOCT_CHIP_TYPE), "reserved6"),)
|
|
CONFIG_MEMC_ALG_V1=y
|
|
endif
|
|
|
|
ifneq ($(findstring $(CONFIG_SOCT_CHIP_TYPE), "reserved9"),)
|
|
CONFIG_MEMC_ALG_V1=y
|
|
endif
|
|
|
|
ifneq ($(findstring $(CONFIG_SOCT_CHIP_TYPE), "reserved8"),)
|
|
CONFIG_MEMC_ALG_V1=y
|
|
endif
|
|
|
|
ifneq ($(findstring $(CONFIG_SOCT_CHIP_TYPE), "reserved19" "reserved17" "hi3751v811"),)
|
|
CONFIG_MEMC_ALG_V2=y
|
|
ifeq ($(CONFIG_PRODUCT_TYPE),"linux")
|
|
MEMC_ALG_DIR := sdk
|
|
else
|
|
MEMC_ALG_DIR := .
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(CONFIG_SOCT_DMCU_SUPPORT),y)
|
|
ccflags-y += -DCONFIG_SOCT_MEMC_ENABLE_DMCU
|
|
endif
|
|
|
|
EXTRA_CFLAGS += -DLOG_MODULE_ID=SOC_ID_MEMC
|
|
EXTRA_CFLAGS += -DEXT_MEMC_SMMU_TGA_RD_ID=0x1
|
|
EXTRA_CFLAGS += -DEXT_MEMC_SMMU_TGA_WR_ID=0x1
|
|
|
|
ccflags-y += -Idrivers/drv/ioctl_inc/memc
|
|
ccflags-y += -Idrivers/drv/ioctl_inc/video
|
|
ccflags-y += -Idrivers/drv/ioctl_inc/generic
|
|
ccflags-y += -Idrivers/drv/ioctl_inc/common
|
|
ccflags-y += -Idrivers/drv/ioctl_inc/pq
|
|
ccflags-y += -Idrivers/drv/ioctl_inc/ssm
|
|
ccflags-y += -Idrivers/drv/ext_inc/base
|
|
ccflags-y += -Idrivers/drv/ext_inc/osal
|
|
ccflags-y += -Idrivers/drv/ext_inc/common
|
|
ccflags-y += -Idrivers/drv/ext_inc/memc
|
|
ccflags-y += -Idrivers/drv/ext_inc/pq
|
|
ccflags-y += -Idrivers/drv/ext_inc/ssm
|
|
ccflags-y += -Idrivers/drv/ext_inc/dftevent
|
|
ccflags-y += -Idrivers/drv/common/include
|
|
ccflags-y += -Idrivers/drv/memc
|
|
ccflags-y += -Idrivers/drv/memc/osal
|
|
ccflags-y += -Idrivers/drv/memc/err_report
|
|
ccflags-y += -Idrivers/drv/memc/comm
|
|
ccflags-y += -Idrivers/drv/memc/buf
|
|
ccflags-y += -Idrivers/drv/memc/hal
|
|
ccflags-y += -Idrivers/drv/memc/hal/fi
|
|
ccflags-y += -Idrivers/drv/memc/hal/me
|
|
ccflags-y += -fstack-protector-all
|
|
|
|
ifeq ($(CONFIG_MEMC_ALG_V1),y)
|
|
$(warning enter CONFIG_MEMC_ALG_V1)
|
|
ccflags-y += -Idrivers/drv/memc/me/v1
|
|
ccflags-y += -Idrivers/drv/memc/memc_alg/v1
|
|
ccflags-y += -Idrivers/drv/memc/pfmd_alg/v1
|
|
ccflags-y += -Idrivers/drv/memc/hal/v1
|
|
ccflags-y += -Idrivers/drv/memc/hal/me/v1
|
|
ccflags-y += -Idrivers/drv/memc/hal/fi/v1
|
|
endif
|
|
|
|
ifeq ($(CONFIG_MEMC_ALG_V2),y)
|
|
$(warning enter CONFIG_MEMC_ALG_V2)
|
|
$(warning MEMC_ALG_DIR---$(MEMC_ALG_DIR)---)
|
|
ccflags-y += -Idrivers/drv/memc/me/v2
|
|
ccflags-y += -Idrivers/drv/memc/memc_alg/v2/$(MEMC_ALG_DIR)
|
|
ccflags-y += -Idrivers/drv/memc/pfmd_alg/v2
|
|
ccflags-y += -Idrivers/drv/memc/hal/v2
|
|
ccflags-y += -Idrivers/drv/memc/hal/me/v2
|
|
ccflags-y += -Idrivers/drv/memc/hal/fi/v2
|
|
ccflags-y += -Idrivers/drv/memc/hal/pfmd/v2
|
|
endif
|
|
|
|
MODNAME := soc_memc
|
|
|
|
ifeq ($(CONFIG_SOCT_DRV_BUILDIN),y)
|
|
obj-$(CONFIG_SOCT_MEMC_SUPPORT) += $(MODNAME).o
|
|
else
|
|
obj-m += $(MODNAME).o
|
|
endif
|
|
|
|
$(MODNAME)-objs-y := osal/drv_memc_osal.o
|
|
$(MODNAME)-objs-y += osal/drv_memc_osal_mem.o
|
|
$(MODNAME)-objs-y += osal/drv_memc_osal_dev.o
|
|
$(MODNAME)-objs-y += osal/drv_memc_osal_proc.o
|
|
$(MODNAME)-objs-y += comm/drv_memc_debug.o
|
|
$(MODNAME)-objs-y += comm/drv_memc_comm.o
|
|
$(MODNAME)-objs-y += comm/drv_memc_utils.o
|
|
$(MODNAME)-objs-y += comm/drv_memc_local.o
|
|
$(MODNAME)-objs-y += err_report/drv_memc_fault_report.o
|
|
$(MODNAME)-objs-y += buf/drv_memc_list.o
|
|
$(MODNAME)-objs-y += buf/drv_memc_buf.o
|
|
|
|
$(MODNAME)-objs-y += drv_memc_dsc.o
|
|
$(MODNAME)-objs-y += drv_memc_delayctrl.o
|
|
|
|
$(MODNAME)-objs-y += drv_memc_ctrl.o
|
|
$(MODNAME)-objs-y += drv_memc_intf.o
|
|
$(MODNAME)-objs-y += drv_memc_fi.o
|
|
$(MODNAME)-objs-y += drv_memc_me_proc.o
|
|
$(MODNAME)-objs-y += drv_memc_fi_proc.o
|
|
$(MODNAME)-objs-y += drv_memc_proc.o
|
|
$(MODNAME)-objs-y += drv_memc_ext.o
|
|
$(MODNAME)-objs-y += drv_memc_mod.o
|
|
|
|
ifeq ($(CONFIG_MEMC_ALG_V1),y)
|
|
$(warning enter CONFIG_MEMC_ALG_V1)
|
|
$(MODNAME)-objs-y += me/v1/drv_memc_me.o
|
|
$(MODNAME)-objs-y += memc_alg/v1/drv_memc_alg_impl.o
|
|
$(MODNAME)-objs-y += memc_alg/v1/drv_memc_alg_ext.o
|
|
$(MODNAME)-objs-y += memc_alg/v1/drv_memc_alg_proc.o
|
|
$(MODNAME)-objs-y += pfmd_alg/v1/drv_pfmd_alg_comm.o
|
|
$(MODNAME)-objs-y += pfmd_alg/v1/drv_pfmd_alg_impl.o
|
|
$(MODNAME)-objs-y += pfmd_alg/v1/drv_pfmd_alg_para.o
|
|
$(MODNAME)-objs-y += pfmd_alg/v1/drv_pfmd_alg_ctrl.o
|
|
$(MODNAME)-objs-y += pfmd_alg/v1/drv_pfmd_alg_proc.o
|
|
$(MODNAME)-objs-y += pfmd_alg/v1/drv_pfmd_alg_ext.o
|
|
$(MODNAME)-objs-y += hal/v1/hal_fi_soc.o
|
|
$(MODNAME)-objs-y += hal/v1/hal_me_soc.o
|
|
$(MODNAME)-objs-y += hal/v1/hal_memc_soc.o
|
|
$(MODNAME)-objs-y += hal/me/v1/hal_me_reg.o
|
|
$(MODNAME)-objs-y += hal/me/v1/hal_me_ref_mmu.o
|
|
$(MODNAME)-objs-y += hal/me/v1/hal_me_ref.o
|
|
$(MODNAME)-objs-y += hal/me/v1/hal_me_alg.o
|
|
$(MODNAME)-objs-y += hal/me/v1/hal_me.o
|
|
$(MODNAME)-objs-y += hal/fi/v1/hal_fi_reg.o
|
|
$(MODNAME)-objs-y += hal/fi/v1/hal_fi_ref_mmu.o
|
|
$(MODNAME)-objs-y += hal/fi/v1/hal_fi_ref.o
|
|
$(MODNAME)-objs-y += hal/fi/v1/hal_fi_alg.o
|
|
$(MODNAME)-objs-y += hal/fi/v1/hal_fi.o
|
|
endif
|
|
|
|
ifeq ($(CONFIG_MEMC_ALG_V2),y)
|
|
$(warning enter CONFIG_MEMC_ALG_V2)
|
|
$(MODNAME)-objs-y += me/v2/drv_memc_me.o
|
|
$(MODNAME)-objs-y += hal/v2/hal_fi_soc.o
|
|
$(MODNAME)-objs-y += hal/v2/hal_me_soc.o
|
|
$(MODNAME)-objs-y += hal/v2/hal_memc_soc.o
|
|
$(MODNAME)-objs-y += hal/fi/v2/hal_fi_reg.o
|
|
$(MODNAME)-objs-y += hal/fi/v2/hal_fi_ref.o
|
|
$(MODNAME)-objs-y += hal/fi/v2/hal_fi_alg.o
|
|
$(MODNAME)-objs-y += hal/fi/v2/hal_fi.o
|
|
$(MODNAME)-objs-y += hal/me/v2/hal_me.o
|
|
$(MODNAME)-objs-y += hal/me/v2/hal_me_alg.o
|
|
$(MODNAME)-objs-y += hal/me/v2/hal_me_reg_config.o
|
|
$(MODNAME)-objs-y += memc_alg/v2/$(MEMC_ALG_DIR)/drv_memc_alg_impl.o
|
|
$(MODNAME)-objs-y += memc_alg/v2/$(MEMC_ALG_DIR)/drv_memc_alg_ext.o
|
|
$(MODNAME)-objs-y += memc_alg/v2/$(MEMC_ALG_DIR)/drv_memc_alg_proc.o
|
|
$(MODNAME)-objs-y += pfmd_alg/v2/drv_pfmd_alg_comm.o
|
|
$(MODNAME)-objs-y += pfmd_alg/v2/drv_pfmd_alg_impl.o
|
|
$(MODNAME)-objs-y += pfmd_alg/v2/drv_pfmd_alg_para.o
|
|
$(MODNAME)-objs-y += pfmd_alg/v2/drv_pfmd_alg_ctrl.o
|
|
$(MODNAME)-objs-y += pfmd_alg/v2/drv_pfmd_alg_proc.o
|
|
$(MODNAME)-objs-y += pfmd_alg/v2/drv_pfmd_alg_ext.o
|
|
endif
|
|
###############################################################################
|
|
$(MODNAME)-objs := $($(MODNAME)-objs-y)
|