From d0037efda9e9ce855279d21b891d29edbfb664fb Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Thu, 18 Jan 2024 12:38:34 -0700 Subject: soc/*: Rename Makefiles from .inc to .mk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The .inc suffix is confusing to various tools as it's not specific to Makefiles. This means that editors don't recognize the files, and don't open them with highlighting and any other specific editor functionality. This issue is also seen in the release notes generation script where Makefiles get renamed before running cloc. Signed-off-by: Martin Roth Change-Id: I6f502b97864fd7782e514ee2daa902d2081633a2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80074 Reviewed-by: Maximilian Brune Reviewed-by: Michael Niewöhner Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Felix Singer --- src/soc/mediatek/mt8173/Makefile.inc | 87 ----------------------------- src/soc/mediatek/mt8173/Makefile.mk | 87 +++++++++++++++++++++++++++++ src/soc/mediatek/mt8183/Makefile.inc | 103 ---------------------------------- src/soc/mediatek/mt8183/Makefile.mk | 103 ++++++++++++++++++++++++++++++++++ src/soc/mediatek/mt8186/Makefile.inc | 86 ----------------------------- src/soc/mediatek/mt8186/Makefile.mk | 86 +++++++++++++++++++++++++++++ src/soc/mediatek/mt8188/Makefile.inc | 96 -------------------------------- src/soc/mediatek/mt8188/Makefile.mk | 96 ++++++++++++++++++++++++++++++++ src/soc/mediatek/mt8192/Makefile.inc | 88 ----------------------------- src/soc/mediatek/mt8192/Makefile.mk | 88 +++++++++++++++++++++++++++++ src/soc/mediatek/mt8195/Makefile.inc | 104 ----------------------------------- src/soc/mediatek/mt8195/Makefile.mk | 104 +++++++++++++++++++++++++++++++++++ 12 files changed, 564 insertions(+), 564 deletions(-) delete mode 100644 src/soc/mediatek/mt8173/Makefile.inc create mode 100644 src/soc/mediatek/mt8173/Makefile.mk delete mode 100644 src/soc/mediatek/mt8183/Makefile.inc create mode 100644 src/soc/mediatek/mt8183/Makefile.mk delete mode 100644 src/soc/mediatek/mt8186/Makefile.inc create mode 100644 src/soc/mediatek/mt8186/Makefile.mk delete mode 100644 src/soc/mediatek/mt8188/Makefile.inc create mode 100644 src/soc/mediatek/mt8188/Makefile.mk delete mode 100644 src/soc/mediatek/mt8192/Makefile.inc create mode 100644 src/soc/mediatek/mt8192/Makefile.mk delete mode 100644 src/soc/mediatek/mt8195/Makefile.inc create mode 100644 src/soc/mediatek/mt8195/Makefile.mk (limited to 'src/soc/mediatek') diff --git a/src/soc/mediatek/mt8173/Makefile.inc b/src/soc/mediatek/mt8173/Makefile.inc deleted file mode 100644 index 7688ecfd45..0000000000 --- a/src/soc/mediatek/mt8173/Makefile.inc +++ /dev/null @@ -1,87 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only - -ifeq ($(CONFIG_SOC_MEDIATEK_MT8173),y) - -bootblock-y += bootblock.c -bootblock-$(CONFIG_SPI_FLASH) += ../common/flash_controller.c -bootblock-y += ../common/i2c.c i2c.c -bootblock-y += ../common/pll.c pll.c -bootblock-y += ../common/spi.c spi.c -bootblock-y += ../common/timer.c -bootblock-y += timer.c - -bootblock-y += ../common/uart.c - -bootblock-y += ../common/gpio.c gpio.c gpio_init.c -bootblock-y += ../common/pmic_wrap.c pmic_wrap.c mt6391.c -bootblock-y += ../common/wdt.c ../common/reset.c -bootblock-y += ../common/mmu_operations.c mmu_operations.c - -################################################################################ - -verstage-y += ../common/i2c.c i2c.c -verstage-y += ../common/spi.c spi.c - -verstage-y += ../common/uart.c - -verstage-y += ../common/timer.c -verstage-y += timer.c -verstage-y += ../common/wdt.c ../common/reset.c -verstage-$(CONFIG_SPI_FLASH) += ../common/flash_controller.c -verstage-y += ../common/gpio.c gpio.c - -################################################################################ - -romstage-$(CONFIG_SPI_FLASH) += ../common/flash_controller.c -romstage-y += ../common/pll.c pll.c -romstage-y += ../common/timer.c -romstage-y += timer.c -romstage-y += ../common/i2c.c i2c.c - -romstage-y += ../common/uart.c -romstage-y += ../common/cbmem.c -romstage-y += ../common/gpio.c gpio.c -romstage-y += ../common/spi.c spi.c -romstage-y += ../common/pmic_wrap.c pmic_wrap.c mt6391.c -romstage-y += memory.c -romstage-y += emi.c dramc_pi_basic_api.c dramc_pi_calibration_api.c -romstage-$(CONFIG_MEMORY_TEST) += ../common/memory_test.c -romstage-y += ../common/wdt.c ../common/reset.c -romstage-y += ../common/mmu_operations.c mmu_operations.c -romstage-y += ../common/rtc.c rtc.c - -################################################################################ - -ramstage-y += emi.c -ramstage-y += ../common/spi.c spi.c -ramstage-$(CONFIG_SPI_FLASH) += ../common/flash_controller.c -ramstage-y += soc.c ../common/mtcmos.c -ramstage-y += ../common/timer.c -ramstage-y += timer.c -ramstage-y += ../common/uart.c -ramstage-y += ../common/i2c.c i2c.c -ramstage-y += ../common/pmic_wrap.c pmic_wrap.c mt6391.c -ramstage-y += mt6311.c -ramstage-y += da9212.c -ramstage-y += ../common/gpio.c gpio.c -ramstage-y += ../common/wdt.c ../common/reset.c -ramstage-y += ../common/pll.c pll.c -ramstage-y += ../common/rtc.c rtc.c - -ramstage-y += ../common/usb.c usb.c - -ramstage-y += ../common/ddp.c ddp.c -ramstage-y += ../common/dsi.c dsi.c - -BL31_MAKEARGS += PLAT=mt8173 - -################################################################################ - -# Generate the actual coreboot bootblock code -$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin - ./util/mtkheader/gen-bl-img.py mt8173 sf $< $@ - -CPPFLAGS_common += -Isrc/soc/mediatek/mt8173/include -CPPFLAGS_common += -Isrc/soc/mediatek/common/include - -endif diff --git a/src/soc/mediatek/mt8173/Makefile.mk b/src/soc/mediatek/mt8173/Makefile.mk new file mode 100644 index 0000000000..7688ecfd45 --- /dev/null +++ b/src/soc/mediatek/mt8173/Makefile.mk @@ -0,0 +1,87 @@ +## SPDX-License-Identifier: GPL-2.0-only + +ifeq ($(CONFIG_SOC_MEDIATEK_MT8173),y) + +bootblock-y += bootblock.c +bootblock-$(CONFIG_SPI_FLASH) += ../common/flash_controller.c +bootblock-y += ../common/i2c.c i2c.c +bootblock-y += ../common/pll.c pll.c +bootblock-y += ../common/spi.c spi.c +bootblock-y += ../common/timer.c +bootblock-y += timer.c + +bootblock-y += ../common/uart.c + +bootblock-y += ../common/gpio.c gpio.c gpio_init.c +bootblock-y += ../common/pmic_wrap.c pmic_wrap.c mt6391.c +bootblock-y += ../common/wdt.c ../common/reset.c +bootblock-y += ../common/mmu_operations.c mmu_operations.c + +################################################################################ + +verstage-y += ../common/i2c.c i2c.c +verstage-y += ../common/spi.c spi.c + +verstage-y += ../common/uart.c + +verstage-y += ../common/timer.c +verstage-y += timer.c +verstage-y += ../common/wdt.c ../common/reset.c +verstage-$(CONFIG_SPI_FLASH) += ../common/flash_controller.c +verstage-y += ../common/gpio.c gpio.c + +################################################################################ + +romstage-$(CONFIG_SPI_FLASH) += ../common/flash_controller.c +romstage-y += ../common/pll.c pll.c +romstage-y += ../common/timer.c +romstage-y += timer.c +romstage-y += ../common/i2c.c i2c.c + +romstage-y += ../common/uart.c +romstage-y += ../common/cbmem.c +romstage-y += ../common/gpio.c gpio.c +romstage-y += ../common/spi.c spi.c +romstage-y += ../common/pmic_wrap.c pmic_wrap.c mt6391.c +romstage-y += memory.c +romstage-y += emi.c dramc_pi_basic_api.c dramc_pi_calibration_api.c +romstage-$(CONFIG_MEMORY_TEST) += ../common/memory_test.c +romstage-y += ../common/wdt.c ../common/reset.c +romstage-y += ../common/mmu_operations.c mmu_operations.c +romstage-y += ../common/rtc.c rtc.c + +################################################################################ + +ramstage-y += emi.c +ramstage-y += ../common/spi.c spi.c +ramstage-$(CONFIG_SPI_FLASH) += ../common/flash_controller.c +ramstage-y += soc.c ../common/mtcmos.c +ramstage-y += ../common/timer.c +ramstage-y += timer.c +ramstage-y += ../common/uart.c +ramstage-y += ../common/i2c.c i2c.c +ramstage-y += ../common/pmic_wrap.c pmic_wrap.c mt6391.c +ramstage-y += mt6311.c +ramstage-y += da9212.c +ramstage-y += ../common/gpio.c gpio.c +ramstage-y += ../common/wdt.c ../common/reset.c +ramstage-y += ../common/pll.c pll.c +ramstage-y += ../common/rtc.c rtc.c + +ramstage-y += ../common/usb.c usb.c + +ramstage-y += ../common/ddp.c ddp.c +ramstage-y += ../common/dsi.c dsi.c + +BL31_MAKEARGS += PLAT=mt8173 + +################################################################################ + +# Generate the actual coreboot bootblock code +$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin + ./util/mtkheader/gen-bl-img.py mt8173 sf $< $@ + +CPPFLAGS_common += -Isrc/soc/mediatek/mt8173/include +CPPFLAGS_common += -Isrc/soc/mediatek/common/include + +endif diff --git a/src/soc/mediatek/mt8183/Makefile.inc b/src/soc/mediatek/mt8183/Makefile.inc deleted file mode 100644 index 3b4a1e8ccb..0000000000 --- a/src/soc/mediatek/mt8183/Makefile.inc +++ /dev/null @@ -1,103 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only -ifeq ($(CONFIG_SOC_MEDIATEK_MT8183),y) - -bootblock-y += bootblock.c -bootblock-y += ../common/auxadc.c -bootblock-y += ../common/gpio.c gpio.c -bootblock-y += ../common/pll.c pll.c -bootblock-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c -bootblock-y += mt8183.c -bootblock-y += ../common/i2c.c i2c.c -bootblock-y += ../common/timer.c -bootblock-y += ../common/uart.c -bootblock-y += ../common/wdt.c - -decompressor-y += decompressor.c -decompressor-y += ../common/mmu_operations.c -decompressor-y += ../common/timer.c - -verstage-y += ../common/auxadc.c -verstage-y += ../common/gpio.c gpio.c -verstage-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c -verstage-y += mt8183.c -verstage-y += ../common/i2c.c i2c.c -verstage-y += ../common/timer.c -verstage-y += ../common/uart.c -verstage-y += ../common/wdt.c - -romstage-y += ../common/auxadc.c -romstage-y += ../common/cbmem.c emi.c -romstage-y += dramc_init_setting.c -romstage-y += dramc_param.c -romstage-y += dramc_pi_basic_api.c -romstage-y += dramc_pi_calibration_api.c -romstage-y += memory.c -romstage-$(CONFIG_MEMORY_TEST) += ../common/memory_test.c -romstage-y += mt8183.c -romstage-y += ../common/gpio.c gpio.c -romstage-y += ../common/mmu_operations.c mmu_operations.c -romstage-y += ../common/pll.c pll.c -romstage-y += ../common/pmic_wrap.c pmic_wrap.c mt6358.c -romstage-y += ../common/rtc.c ../common/rtc_osc_init.c rtc.c -romstage-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c -romstage-y += ../common/i2c.c i2c.c -romstage-y += ../common/timer.c -romstage-y += ../common/uart.c -romstage-y += ../common/wdt.c - -ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += ../common/bl31.c -ramstage-y += emi.c -ramstage-y += ../common/auxadc.c -ramstage-y += ../common/ddp.c ddp.c -ramstage-y += ../common/dsi.c ../common/mtk_mipi_dphy.c -ramstage-y += ../common/gpio.c gpio.c -ramstage-y += ../common/i2c.c i2c.c -ramstage-y += ../common/mcu.c -ramstage-y += ../common/mmu_operations.c mmu_operations.c -ramstage-y += ../common/mtcmos.c mtcmos.c -ramstage-y += ../common/pmic_wrap.c -ramstage-y += ../common/rtc.c ../common/rtc_osc_init.c rtc.c -ramstage-y += soc.c -ramstage-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c -ramstage-y += spm.c -ramstage-y += ../common/sspm.c -ramstage-y += ../common/timer.c -ramstage-y += ../common/uart.c -ramstage-y += ../common/usb.c -ramstage-y += ../common/wdt.c -ramstage-y += md_ctrl.c - -MT8183_BLOB_DIR := 3rdparty/blobs/soc/mediatek/mt8183 - -cbfs-files-y += pcm_allinone_lp4_3200.bin -pcm_allinone_lp4_3200.bin-file := $(MT8183_BLOB_DIR)/pcm_allinone_lp4_3200.bin -pcm_allinone_lp4_3200.bin-type := raw -pcm_allinone_lp4_3200.bin-compression := $(CBFS_COMPRESS_FLAG) - -cbfs-files-y += pcm_allinone_lp4_3733.bin -pcm_allinone_lp4_3733.bin-file := $(MT8183_BLOB_DIR)/pcm_allinone_lp4_3733.bin -pcm_allinone_lp4_3733.bin-type := raw -pcm_allinone_lp4_3733.bin-compression := $(CBFS_COMPRESS_FLAG) - -cbfs-files-y += sspm.bin -sspm.bin-file := $(MT8183_BLOB_DIR)/sspm.bin -sspm.bin-type := raw -sspm.bin-compression := $(CBFS_COMPRESS_FLAG) - -DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram -$(DRAM_CBFS)-file := $(MT8183_BLOB_DIR)/dram.elf -$(DRAM_CBFS)-type := stage -$(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG) -ifneq ($(wildcard $($(DRAM_CBFS)-file)),) - cbfs-files-y += $(DRAM_CBFS) -endif - -BL31_MAKEARGS += PLAT=mt8183 - -CPPFLAGS_common += -Isrc/soc/mediatek/mt8183/include -CPPFLAGS_common += -Isrc/soc/mediatek/common/include - -$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin - ./util/mtkheader/gen-bl-img.py mt8183 emmc $< $@ - -endif diff --git a/src/soc/mediatek/mt8183/Makefile.mk b/src/soc/mediatek/mt8183/Makefile.mk new file mode 100644 index 0000000000..3b4a1e8ccb --- /dev/null +++ b/src/soc/mediatek/mt8183/Makefile.mk @@ -0,0 +1,103 @@ +## SPDX-License-Identifier: GPL-2.0-only +ifeq ($(CONFIG_SOC_MEDIATEK_MT8183),y) + +bootblock-y += bootblock.c +bootblock-y += ../common/auxadc.c +bootblock-y += ../common/gpio.c gpio.c +bootblock-y += ../common/pll.c pll.c +bootblock-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c +bootblock-y += mt8183.c +bootblock-y += ../common/i2c.c i2c.c +bootblock-y += ../common/timer.c +bootblock-y += ../common/uart.c +bootblock-y += ../common/wdt.c + +decompressor-y += decompressor.c +decompressor-y += ../common/mmu_operations.c +decompressor-y += ../common/timer.c + +verstage-y += ../common/auxadc.c +verstage-y += ../common/gpio.c gpio.c +verstage-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c +verstage-y += mt8183.c +verstage-y += ../common/i2c.c i2c.c +verstage-y += ../common/timer.c +verstage-y += ../common/uart.c +verstage-y += ../common/wdt.c + +romstage-y += ../common/auxadc.c +romstage-y += ../common/cbmem.c emi.c +romstage-y += dramc_init_setting.c +romstage-y += dramc_param.c +romstage-y += dramc_pi_basic_api.c +romstage-y += dramc_pi_calibration_api.c +romstage-y += memory.c +romstage-$(CONFIG_MEMORY_TEST) += ../common/memory_test.c +romstage-y += mt8183.c +romstage-y += ../common/gpio.c gpio.c +romstage-y += ../common/mmu_operations.c mmu_operations.c +romstage-y += ../common/pll.c pll.c +romstage-y += ../common/pmic_wrap.c pmic_wrap.c mt6358.c +romstage-y += ../common/rtc.c ../common/rtc_osc_init.c rtc.c +romstage-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c +romstage-y += ../common/i2c.c i2c.c +romstage-y += ../common/timer.c +romstage-y += ../common/uart.c +romstage-y += ../common/wdt.c + +ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += ../common/bl31.c +ramstage-y += emi.c +ramstage-y += ../common/auxadc.c +ramstage-y += ../common/ddp.c ddp.c +ramstage-y += ../common/dsi.c ../common/mtk_mipi_dphy.c +ramstage-y += ../common/gpio.c gpio.c +ramstage-y += ../common/i2c.c i2c.c +ramstage-y += ../common/mcu.c +ramstage-y += ../common/mmu_operations.c mmu_operations.c +ramstage-y += ../common/mtcmos.c mtcmos.c +ramstage-y += ../common/pmic_wrap.c +ramstage-y += ../common/rtc.c ../common/rtc_osc_init.c rtc.c +ramstage-y += soc.c +ramstage-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c +ramstage-y += spm.c +ramstage-y += ../common/sspm.c +ramstage-y += ../common/timer.c +ramstage-y += ../common/uart.c +ramstage-y += ../common/usb.c +ramstage-y += ../common/wdt.c +ramstage-y += md_ctrl.c + +MT8183_BLOB_DIR := 3rdparty/blobs/soc/mediatek/mt8183 + +cbfs-files-y += pcm_allinone_lp4_3200.bin +pcm_allinone_lp4_3200.bin-file := $(MT8183_BLOB_DIR)/pcm_allinone_lp4_3200.bin +pcm_allinone_lp4_3200.bin-type := raw +pcm_allinone_lp4_3200.bin-compression := $(CBFS_COMPRESS_FLAG) + +cbfs-files-y += pcm_allinone_lp4_3733.bin +pcm_allinone_lp4_3733.bin-file := $(MT8183_BLOB_DIR)/pcm_allinone_lp4_3733.bin +pcm_allinone_lp4_3733.bin-type := raw +pcm_allinone_lp4_3733.bin-compression := $(CBFS_COMPRESS_FLAG) + +cbfs-files-y += sspm.bin +sspm.bin-file := $(MT8183_BLOB_DIR)/sspm.bin +sspm.bin-type := raw +sspm.bin-compression := $(CBFS_COMPRESS_FLAG) + +DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram +$(DRAM_CBFS)-file := $(MT8183_BLOB_DIR)/dram.elf +$(DRAM_CBFS)-type := stage +$(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG) +ifneq ($(wildcard $($(DRAM_CBFS)-file)),) + cbfs-files-y += $(DRAM_CBFS) +endif + +BL31_MAKEARGS += PLAT=mt8183 + +CPPFLAGS_common += -Isrc/soc/mediatek/mt8183/include +CPPFLAGS_common += -Isrc/soc/mediatek/common/include + +$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin + ./util/mtkheader/gen-bl-img.py mt8183 emmc $< $@ + +endif diff --git a/src/soc/mediatek/mt8186/Makefile.inc b/src/soc/mediatek/mt8186/Makefile.inc deleted file mode 100644 index 3a3cc07ce6..0000000000 --- a/src/soc/mediatek/mt8186/Makefile.inc +++ /dev/null @@ -1,86 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only -ifeq ($(CONFIG_SOC_MEDIATEK_MT8186),y) - -# for bootblock, verstage, romstage, ramstage -all-y += ../common/cpu_id.c -all-y += ../common/flash_controller.c -all-y += ../common/gpio.c ../common/gpio_op.c gpio.c -all-y += ../common/i2c.c i2c.c -all-y += ../common/pll.c pll.c -all-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c -all-y += ../common/timer.c ../common/timer_prepare.c -all-y += ../common/uart.c - -bootblock-y += bootblock.c -bootblock-y += ../common/eint_event.c -bootblock-y += gic.c -bootblock-y += ../common/lastbus_v1.c -bootblock-y += ../common/mmu_operations.c -bootblock-y += ../common/tracker.c ../common/tracker_v1.c -bootblock-y += ../common/wdt.c ../common/wdt_req.c wdt.c - -romstage-y += ../common/cbmem.c -romstage-y += ../common/dram_init.c -romstage-y += ../common/dramc_param.c -romstage-y += ../common/emi.c -romstage-y += ../common/memory.c -romstage-y += ../common/memory_test.c -romstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c -romstage-y += ../common/mt6315.c mt6315.c -romstage-y += ../common/pmic_wrap.c pmic_wrap.c pmif.c mt6366.c -romstage-y += ../common/pmif.c ../common/pmif_clk.c pmif_clk.c -romstage-y += ../common/pmif_spmi.c pmif_spmi.c -romstage-y += ../common/rtc.c ../common/rtc_osc_init.c rtc.c - -ramstage-y += adsp.c -ramstage-y += ../common/auxadc.c -ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += ../common/bl31.c -ramstage-y += ../common/ddp.c ddp.c -ramstage-y += ../common/devapc.c devapc.c -ramstage-y += ../common/dfd.c -ramstage-y += ../common/display.c -ramstage-y += ../common/dsi.c ../common/mtk_mipi_dphy.c -ramstage-y += ../common/emi.c -ramstage-y += ../common/mcu.c -ramstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c -ramstage-$(CONFIG_COMMONLIB_STORAGE_MMC) += ../common/msdc.c msdc.c -ramstage-y += ../common/mtcmos.c mtcmos.c -ramstage-y += ../common/pmic_wrap.c pmic_wrap.c pmif.c mt6366.c -ramstage-y += ../common/rtc.c ../common/rtc_osc_init.c rtc.c -ramstage-y += soc.c -ramstage-y += ../common/spm.c spm.c -ramstage-y += ../common/sspm.c -ramstage-y += ../common/tps65132s.c -ramstage-y += ../common/usb.c usb.c - -CPPFLAGS_common += -Isrc/soc/mediatek/mt8186/include -CPPFLAGS_common += -Isrc/soc/mediatek/common/dp/include -CPPFLAGS_common += -Isrc/soc/mediatek/common/include - -BL31_MAKEARGS += PLAT=mt8186 - -MT8186_BLOB_DIR := 3rdparty/blobs/soc/mediatek/mt8186 - -mcu-firmware-files := \ - $(CONFIG_SSPM_FIRMWARE) \ - $(CONFIG_SPM_FIRMWARE) - -$(foreach fw, $(call strip_quotes,$(mcu-firmware-files)), \ - $(eval $(fw)-file := $(MT8186_BLOB_DIR)/$(fw)) \ - $(eval $(fw)-type := raw) \ - $(eval $(fw)-compression := LZ4) \ - $(if $(wildcard $($(fw)-file)), $(eval cbfs-files-y += $(fw)), ) \ -) - -DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram -$(DRAM_CBFS)-file := $(MT8186_BLOB_DIR)/dram.elf -$(DRAM_CBFS)-type := stage -$(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG) -ifneq ($(wildcard $($(DRAM_CBFS)-file)),) - cbfs-files-y += $(DRAM_CBFS) -endif - -$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin - ./util/mtkheader/gen-bl-img.py mt8183 sf $< $@ - -endif diff --git a/src/soc/mediatek/mt8186/Makefile.mk b/src/soc/mediatek/mt8186/Makefile.mk new file mode 100644 index 0000000000..3a3cc07ce6 --- /dev/null +++ b/src/soc/mediatek/mt8186/Makefile.mk @@ -0,0 +1,86 @@ +## SPDX-License-Identifier: GPL-2.0-only +ifeq ($(CONFIG_SOC_MEDIATEK_MT8186),y) + +# for bootblock, verstage, romstage, ramstage +all-y += ../common/cpu_id.c +all-y += ../common/flash_controller.c +all-y += ../common/gpio.c ../common/gpio_op.c gpio.c +all-y += ../common/i2c.c i2c.c +all-y += ../common/pll.c pll.c +all-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c +all-y += ../common/timer.c ../common/timer_prepare.c +all-y += ../common/uart.c + +bootblock-y += bootblock.c +bootblock-y += ../common/eint_event.c +bootblock-y += gic.c +bootblock-y += ../common/lastbus_v1.c +bootblock-y += ../common/mmu_operations.c +bootblock-y += ../common/tracker.c ../common/tracker_v1.c +bootblock-y += ../common/wdt.c ../common/wdt_req.c wdt.c + +romstage-y += ../common/cbmem.c +romstage-y += ../common/dram_init.c +romstage-y += ../common/dramc_param.c +romstage-y += ../common/emi.c +romstage-y += ../common/memory.c +romstage-y += ../common/memory_test.c +romstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c +romstage-y += ../common/mt6315.c mt6315.c +romstage-y += ../common/pmic_wrap.c pmic_wrap.c pmif.c mt6366.c +romstage-y += ../common/pmif.c ../common/pmif_clk.c pmif_clk.c +romstage-y += ../common/pmif_spmi.c pmif_spmi.c +romstage-y += ../common/rtc.c ../common/rtc_osc_init.c rtc.c + +ramstage-y += adsp.c +ramstage-y += ../common/auxadc.c +ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += ../common/bl31.c +ramstage-y += ../common/ddp.c ddp.c +ramstage-y += ../common/devapc.c devapc.c +ramstage-y += ../common/dfd.c +ramstage-y += ../common/display.c +ramstage-y += ../common/dsi.c ../common/mtk_mipi_dphy.c +ramstage-y += ../common/emi.c +ramstage-y += ../common/mcu.c +ramstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c +ramstage-$(CONFIG_COMMONLIB_STORAGE_MMC) += ../common/msdc.c msdc.c +ramstage-y += ../common/mtcmos.c mtcmos.c +ramstage-y += ../common/pmic_wrap.c pmic_wrap.c pmif.c mt6366.c +ramstage-y += ../common/rtc.c ../common/rtc_osc_init.c rtc.c +ramstage-y += soc.c +ramstage-y += ../common/spm.c spm.c +ramstage-y += ../common/sspm.c +ramstage-y += ../common/tps65132s.c +ramstage-y += ../common/usb.c usb.c + +CPPFLAGS_common += -Isrc/soc/mediatek/mt8186/include +CPPFLAGS_common += -Isrc/soc/mediatek/common/dp/include +CPPFLAGS_common += -Isrc/soc/mediatek/common/include + +BL31_MAKEARGS += PLAT=mt8186 + +MT8186_BLOB_DIR := 3rdparty/blobs/soc/mediatek/mt8186 + +mcu-firmware-files := \ + $(CONFIG_SSPM_FIRMWARE) \ + $(CONFIG_SPM_FIRMWARE) + +$(foreach fw, $(call strip_quotes,$(mcu-firmware-files)), \ + $(eval $(fw)-file := $(MT8186_BLOB_DIR)/$(fw)) \ + $(eval $(fw)-type := raw) \ + $(eval $(fw)-compression := LZ4) \ + $(if $(wildcard $($(fw)-file)), $(eval cbfs-files-y += $(fw)), ) \ +) + +DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram +$(DRAM_CBFS)-file := $(MT8186_BLOB_DIR)/dram.elf +$(DRAM_CBFS)-type := stage +$(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG) +ifneq ($(wildcard $($(DRAM_CBFS)-file)),) + cbfs-files-y += $(DRAM_CBFS) +endif + +$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin + ./util/mtkheader/gen-bl-img.py mt8183 sf $< $@ + +endif diff --git a/src/soc/mediatek/mt8188/Makefile.inc b/src/soc/mediatek/mt8188/Makefile.inc deleted file mode 100644 index 14f7d38e3b..0000000000 --- a/src/soc/mediatek/mt8188/Makefile.inc +++ /dev/null @@ -1,96 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only -ifeq ($(CONFIG_SOC_MEDIATEK_MT8188),y) - -all-y += ../common/flash_controller.c -all-y += ../common/gpio.c ../common/gpio_op.c gpio.c -all-y += ../common/i2c.c i2c.c -all-y += ../common/pll.c pll.c -all-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c -all-y += timer.c ../common/timer_prepare.c -all-y += ../common/uart.c - -bootblock-y += ../common/bootblock.c bootblock.c -bootblock-y += ../common/eint_event.c -bootblock-y += ../common/lastbus_v2.c lastbus.c -bootblock-y += ../common/mmu_operations.c -bootblock-y += ../common/tracker.c ../common/tracker_v2.c -bootblock-y += ../common/wdt.c ../common/wdt_req.c wdt.c - -romstage-y += ../common/cbmem.c -romstage-y += ../common/clkbuf.c -romstage-y += ../common/dram_init.c -romstage-y += ../common/dramc_param.c -romstage-y += ../common/emi.c -romstage-y += ../common/memory.c -romstage-y += ../common/memory_test.c -romstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c -romstage-y += ../common/mt6315.c mt6315.c -romstage-y += ../common/mt6359p.c mt6359p.c -romstage-y += ../common/pmif.c ../common/pmif_clk.c pmif_clk.c -romstage-y += ../common/pmif_spi.c pmif_spi.c -romstage-y += ../common/pmif_spmi.c pmif_spmi.c -romstage-y += ../common/rtc.c ../common/rtc_osc_init.c ../common/rtc_mt6359p.c - -ramstage-y += ../common/auxadc.c -ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += ../common/bl31.c -ramstage-y += cpu_input_gating.c -ramstage-y += ../common/ddp.c ddp.c -ramstage-y += ../common/devapc.c devapc.c -ramstage-y += ../common/dfd.c -ramstage-y += ../common/display.c -ramstage-y += ../common/dp/dp_intf.c ../common/dp/dptx.c ../common/dp/dptx_hal.c dp_intf.c -ramstage-y += ../common/dpm.c -ramstage-$(CONFIG_DPM_FOUR_CHANNEL) += ../common/dpm_4ch.c -ramstage-y += ../common/dsi.c ../common/mtk_mipi_dphy.c -ramstage-y += ../common/emi.c -ramstage-y += ../common/mcu.c -ramstage-y += ../common/mcupm.c -ramstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c -ramstage-$(CONFIG_COMMONLIB_STORAGE_MMC) += ../common/msdc.c msdc.c -ramstage-y += ../common/mt6359p.c mt6359p.c -ramstage-y += ../common/mtcmos.c mtcmos.c -ramstage-y += ../common/pmif.c ../common/pmif_clk.c pmif_clk.c -ramstage-y += ../common/pmif_spi.c pmif_spi.c -ramstage-y += ../common/pmif_spmi.c pmif_spmi.c -ramstage-y += ../common/rtc.c ../common/rtc_osc_init.c ../common/rtc_mt6359p.c -ramstage-y += soc.c -ramstage-y += ../common/spm.c spm.c -ramstage-y += ../common/sspm.c -ramstage-y += ../common/tps65132s.c -ramstage-y += ../common/usb.c usb.c - -BL31_MAKEARGS += PLAT=mt8188 SPD=opteed -BL31_MAKEARGS += OPTEE_ALLOW_SMC_LOAD=1 PLAT_XLAT_TABLES_DYNAMIC=1 - -CPPFLAGS_common += -Isrc/soc/mediatek/mt8188/include -CPPFLAGS_common += -Isrc/soc/mediatek/common/dp/include -CPPFLAGS_common += -Isrc/soc/mediatek/common/include - -MT8188_BLOB_DIR := 3rdparty/blobs/soc/mediatek/mt8188 - -mcu-firmware-files := \ - $(CONFIG_DPM_DM_FIRMWARE) \ - $(CONFIG_DPM_PM_FIRMWARE) \ - $(CONFIG_MCUPM_FIRMWARE) \ - $(CONFIG_SPM_FIRMWARE) \ - $(CONFIG_SSPM_FIRMWARE) - -$(foreach fw, $(call strip_quotes,$(mcu-firmware-files)), \ - $(eval $(fw)-file := $(MT8188_BLOB_DIR)/$(fw)) \ - $(eval $(fw)-type := raw) \ - $(eval $(fw)-compression := LZ4) \ - $(if $(wildcard $($(fw)-file)), $(eval cbfs-files-y += $(fw)), ) \ -) - -DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram -$(DRAM_CBFS)-file := $(MT8188_BLOB_DIR)/dram.elf -$(DRAM_CBFS)-type := stage -$(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG) -ifneq ($(wildcard $($(DRAM_CBFS)-file)),) - cbfs-files-y += $(DRAM_CBFS) -endif - -$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin - ./util/mtkheader/gen-bl-img.py mt8183 sf $< $@ - -endif diff --git a/src/soc/mediatek/mt8188/Makefile.mk b/src/soc/mediatek/mt8188/Makefile.mk new file mode 100644 index 0000000000..14f7d38e3b --- /dev/null +++ b/src/soc/mediatek/mt8188/Makefile.mk @@ -0,0 +1,96 @@ +## SPDX-License-Identifier: GPL-2.0-only +ifeq ($(CONFIG_SOC_MEDIATEK_MT8188),y) + +all-y += ../common/flash_controller.c +all-y += ../common/gpio.c ../common/gpio_op.c gpio.c +all-y += ../common/i2c.c i2c.c +all-y += ../common/pll.c pll.c +all-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c +all-y += timer.c ../common/timer_prepare.c +all-y += ../common/uart.c + +bootblock-y += ../common/bootblock.c bootblock.c +bootblock-y += ../common/eint_event.c +bootblock-y += ../common/lastbus_v2.c lastbus.c +bootblock-y += ../common/mmu_operations.c +bootblock-y += ../common/tracker.c ../common/tracker_v2.c +bootblock-y += ../common/wdt.c ../common/wdt_req.c wdt.c + +romstage-y += ../common/cbmem.c +romstage-y += ../common/clkbuf.c +romstage-y += ../common/dram_init.c +romstage-y += ../common/dramc_param.c +romstage-y += ../common/emi.c +romstage-y += ../common/memory.c +romstage-y += ../common/memory_test.c +romstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c +romstage-y += ../common/mt6315.c mt6315.c +romstage-y += ../common/mt6359p.c mt6359p.c +romstage-y += ../common/pmif.c ../common/pmif_clk.c pmif_clk.c +romstage-y += ../common/pmif_spi.c pmif_spi.c +romstage-y += ../common/pmif_spmi.c pmif_spmi.c +romstage-y += ../common/rtc.c ../common/rtc_osc_init.c ../common/rtc_mt6359p.c + +ramstage-y += ../common/auxadc.c +ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += ../common/bl31.c +ramstage-y += cpu_input_gating.c +ramstage-y += ../common/ddp.c ddp.c +ramstage-y += ../common/devapc.c devapc.c +ramstage-y += ../common/dfd.c +ramstage-y += ../common/display.c +ramstage-y += ../common/dp/dp_intf.c ../common/dp/dptx.c ../common/dp/dptx_hal.c dp_intf.c +ramstage-y += ../common/dpm.c +ramstage-$(CONFIG_DPM_FOUR_CHANNEL) += ../common/dpm_4ch.c +ramstage-y += ../common/dsi.c ../common/mtk_mipi_dphy.c +ramstage-y += ../common/emi.c +ramstage-y += ../common/mcu.c +ramstage-y += ../common/mcupm.c +ramstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c +ramstage-$(CONFIG_COMMONLIB_STORAGE_MMC) += ../common/msdc.c msdc.c +ramstage-y += ../common/mt6359p.c mt6359p.c +ramstage-y += ../common/mtcmos.c mtcmos.c +ramstage-y += ../common/pmif.c ../common/pmif_clk.c pmif_clk.c +ramstage-y += ../common/pmif_spi.c pmif_spi.c +ramstage-y += ../common/pmif_spmi.c pmif_spmi.c +ramstage-y += ../common/rtc.c ../common/rtc_osc_init.c ../common/rtc_mt6359p.c +ramstage-y += soc.c +ramstage-y += ../common/spm.c spm.c +ramstage-y += ../common/sspm.c +ramstage-y += ../common/tps65132s.c +ramstage-y += ../common/usb.c usb.c + +BL31_MAKEARGS += PLAT=mt8188 SPD=opteed +BL31_MAKEARGS += OPTEE_ALLOW_SMC_LOAD=1 PLAT_XLAT_TABLES_DYNAMIC=1 + +CPPFLAGS_common += -Isrc/soc/mediatek/mt8188/include +CPPFLAGS_common += -Isrc/soc/mediatek/common/dp/include +CPPFLAGS_common += -Isrc/soc/mediatek/common/include + +MT8188_BLOB_DIR := 3rdparty/blobs/soc/mediatek/mt8188 + +mcu-firmware-files := \ + $(CONFIG_DPM_DM_FIRMWARE) \ + $(CONFIG_DPM_PM_FIRMWARE) \ + $(CONFIG_MCUPM_FIRMWARE) \ + $(CONFIG_SPM_FIRMWARE) \ + $(CONFIG_SSPM_FIRMWARE) + +$(foreach fw, $(call strip_quotes,$(mcu-firmware-files)), \ + $(eval $(fw)-file := $(MT8188_BLOB_DIR)/$(fw)) \ + $(eval $(fw)-type := raw) \ + $(eval $(fw)-compression := LZ4) \ + $(if $(wildcard $($(fw)-file)), $(eval cbfs-files-y += $(fw)), ) \ +) + +DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram +$(DRAM_CBFS)-file := $(MT8188_BLOB_DIR)/dram.elf +$(DRAM_CBFS)-type := stage +$(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG) +ifneq ($(wildcard $($(DRAM_CBFS)-file)),) + cbfs-files-y += $(DRAM_CBFS) +endif + +$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin + ./util/mtkheader/gen-bl-img.py mt8183 sf $< $@ + +endif diff --git a/src/soc/mediatek/mt8192/Makefile.inc b/src/soc/mediatek/mt8192/Makefile.inc deleted file mode 100644 index 5d4b87b51e..0000000000 --- a/src/soc/mediatek/mt8192/Makefile.inc +++ /dev/null @@ -1,88 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only -ifeq ($(CONFIG_SOC_MEDIATEK_MT8192),y) - -# for bootblock, verstage, romstage, ramstage -all-y += ../common/flash_controller.c -all-y += ../common/gpio.c ../common/gpio_op.c gpio.c -all-y += ../common/i2c.c i2c.c -all-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c -all-y += ../common/timer.c -all-y += ../common/uart.c - -bootblock-y += bootblock.c -bootblock-y += ../common/eint_event.c -bootblock-y += ../common/mmu_operations.c -bootblock-y += ../common/pll.c pll.c -bootblock-y += ../common/tracker.c ../common/tracker_v2.c -bootblock-y += ../common/wdt.c ../common/wdt_req.c - -romstage-y += ../common/auxadc.c -romstage-y += ../common/cbmem.c -romstage-y += ../common/clkbuf.c srclken_rc.c -romstage-y += ../common/dram_init.c -romstage-y += ../common/dramc_param.c -romstage-y += ../common/memory.c ../common/memory_test.c -romstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c -romstage-y += ../common/pll.c pll.c -romstage-y += ../common/pmif.c ../common/pmif_clk.c pmif_clk.c -romstage-y += ../common/pmif_spi.c pmif_spi.c -romstage-y += ../common/pmif_spmi.c pmif_spmi.c -romstage-y += ../common/mt6315.c mt6315.c -romstage-y += ../common/mt6359p.c mt6359p.c -romstage-y += ../common/rtc.c ../common/rtc_osc_init.c ../common/rtc_mt6359p.c - -ramstage-y += apusys.c -ramstage-y += ../common/auxadc.c -ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += ../common/bl31.c -ramstage-y += ../common/ddp.c ddp.c -ramstage-y += devapc.c -ramstage-y += ../common/dfd.c -ramstage-y += ../common/dpm.c -ramstage-y += ../common/dsi.c ../common/mtk_mipi_dphy.c -ramstage-y += ../common/mcu.c -ramstage-y += ../common/mcupm.c -ramstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c -ramstage-$(CONFIG_COMMONLIB_STORAGE_MMC) += ../common/msdc.c msdc.c -ramstage-y += ../common/mtcmos.c mtcmos.c -ramstage-y += ../common/pmif.c -ramstage-y += ../common/rtc.c ../common/rtc_mt6359p.c -ramstage-y += soc.c -ramstage-y += ../common/spm.c spm.c -ramstage-y += ../common/sspm.c -ramstage-y += ../common/ufs.c -ramstage-y += ../common/usb.c usb.c - -CPPFLAGS_common += -Isrc/soc/mediatek/mt8192/include -CPPFLAGS_common += -Isrc/soc/mediatek/common/include -CPPFLAGS_common += -Isrc/vendorcode/mediatek/mt8192/include - -BL31_MAKEARGS += PLAT=mt8192 - -MT8192_BLOB_DIR := 3rdparty/blobs/soc/mediatek/mt8192 - -mcu-firmware-files := \ - $(CONFIG_DPM_DM_FIRMWARE) \ - $(CONFIG_DPM_PM_FIRMWARE) \ - $(CONFIG_MCUPM_FIRMWARE) \ - $(CONFIG_SSPM_FIRMWARE) \ - $(CONFIG_SPM_FIRMWARE) - -$(foreach fw, $(call strip_quotes,$(mcu-firmware-files)), \ - $(eval $(fw)-file := $(MT8192_BLOB_DIR)/$(fw)) \ - $(eval $(fw)-type := raw) \ - $(eval $(fw)-compression := LZ4) \ - $(if $(wildcard $($(fw)-file)), $(eval cbfs-files-y += $(fw)), ) \ -) - -DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram -$(DRAM_CBFS)-file := $(MT8192_BLOB_DIR)/dram.elf -$(DRAM_CBFS)-type := stage -$(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG) -ifneq ($(wildcard $($(DRAM_CBFS)-file)),) - cbfs-files-y += $(DRAM_CBFS) -endif - -$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin - ./util/mtkheader/gen-bl-img.py mt8183 sf $< $@ - -endif diff --git a/src/soc/mediatek/mt8192/Makefile.mk b/src/soc/mediatek/mt8192/Makefile.mk new file mode 100644 index 0000000000..5d4b87b51e --- /dev/null +++ b/src/soc/mediatek/mt8192/Makefile.mk @@ -0,0 +1,88 @@ +## SPDX-License-Identifier: GPL-2.0-only +ifeq ($(CONFIG_SOC_MEDIATEK_MT8192),y) + +# for bootblock, verstage, romstage, ramstage +all-y += ../common/flash_controller.c +all-y += ../common/gpio.c ../common/gpio_op.c gpio.c +all-y += ../common/i2c.c i2c.c +all-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c +all-y += ../common/timer.c +all-y += ../common/uart.c + +bootblock-y += bootblock.c +bootblock-y += ../common/eint_event.c +bootblock-y += ../common/mmu_operations.c +bootblock-y += ../common/pll.c pll.c +bootblock-y += ../common/tracker.c ../common/tracker_v2.c +bootblock-y += ../common/wdt.c ../common/wdt_req.c + +romstage-y += ../common/auxadc.c +romstage-y += ../common/cbmem.c +romstage-y += ../common/clkbuf.c srclken_rc.c +romstage-y += ../common/dram_init.c +romstage-y += ../common/dramc_param.c +romstage-y += ../common/memory.c ../common/memory_test.c +romstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c +romstage-y += ../common/pll.c pll.c +romstage-y += ../common/pmif.c ../common/pmif_clk.c pmif_clk.c +romstage-y += ../common/pmif_spi.c pmif_spi.c +romstage-y += ../common/pmif_spmi.c pmif_spmi.c +romstage-y += ../common/mt6315.c mt6315.c +romstage-y += ../common/mt6359p.c mt6359p.c +romstage-y += ../common/rtc.c ../common/rtc_osc_init.c ../common/rtc_mt6359p.c + +ramstage-y += apusys.c +ramstage-y += ../common/auxadc.c +ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += ../common/bl31.c +ramstage-y += ../common/ddp.c ddp.c +ramstage-y += devapc.c +ramstage-y += ../common/dfd.c +ramstage-y += ../common/dpm.c +ramstage-y += ../common/dsi.c ../common/mtk_mipi_dphy.c +ramstage-y += ../common/mcu.c +ramstage-y += ../common/mcupm.c +ramstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c +ramstage-$(CONFIG_COMMONLIB_STORAGE_MMC) += ../common/msdc.c msdc.c +ramstage-y += ../common/mtcmos.c mtcmos.c +ramstage-y += ../common/pmif.c +ramstage-y += ../common/rtc.c ../common/rtc_mt6359p.c +ramstage-y += soc.c +ramstage-y += ../common/spm.c spm.c +ramstage-y += ../common/sspm.c +ramstage-y += ../common/ufs.c +ramstage-y += ../common/usb.c usb.c + +CPPFLAGS_common += -Isrc/soc/mediatek/mt8192/include +CPPFLAGS_common += -Isrc/soc/mediatek/common/include +CPPFLAGS_common += -Isrc/vendorcode/mediatek/mt8192/include + +BL31_MAKEARGS += PLAT=mt8192 + +MT8192_BLOB_DIR := 3rdparty/blobs/soc/mediatek/mt8192 + +mcu-firmware-files := \ + $(CONFIG_DPM_DM_FIRMWARE) \ + $(CONFIG_DPM_PM_FIRMWARE) \ + $(CONFIG_MCUPM_FIRMWARE) \ + $(CONFIG_SSPM_FIRMWARE) \ + $(CONFIG_SPM_FIRMWARE) + +$(foreach fw, $(call strip_quotes,$(mcu-firmware-files)), \ + $(eval $(fw)-file := $(MT8192_BLOB_DIR)/$(fw)) \ + $(eval $(fw)-type := raw) \ + $(eval $(fw)-compression := LZ4) \ + $(if $(wildcard $($(fw)-file)), $(eval cbfs-files-y += $(fw)), ) \ +) + +DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram +$(DRAM_CBFS)-file := $(MT8192_BLOB_DIR)/dram.elf +$(DRAM_CBFS)-type := stage +$(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG) +ifneq ($(wildcard $($(DRAM_CBFS)-file)),) + cbfs-files-y += $(DRAM_CBFS) +endif + +$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin + ./util/mtkheader/gen-bl-img.py mt8183 sf $< $@ + +endif diff --git a/src/soc/mediatek/mt8195/Makefile.inc b/src/soc/mediatek/mt8195/Makefile.inc deleted file mode 100644 index 56a10bc2f2..0000000000 --- a/src/soc/mediatek/mt8195/Makefile.inc +++ /dev/null @@ -1,104 +0,0 @@ -## SPDX-License-Identifier: GPL-2.0-only -ifeq ($(CONFIG_SOC_MEDIATEK_MT8195),y) - -# for bootblock, verstage, romstage, ramstage -all-y += ../common/flash_controller.c -all-y += ../common/gpio.c ../common/gpio_op.c gpio.c -all-y += ../common/i2c.c i2c.c -all-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c -all-y += ../common/timer.c ../common/timer_prepare.c -all-y += ../common/uart.c - -bootblock-y += bootblock.c -bootblock-y += ../common/early_init.c -bootblock-y += ../common/eint_event.c -bootblock-y += ../common/mmu_operations.c -bootblock-$(CONFIG_PCI) += pcie.c -bootblock-y += ../common/pll.c pll.c -bootblock-y += ../common/tracker.c ../common/tracker_v2.c -bootblock-y += ../common/wdt.c ../common/wdt_req.c wdt.c - -romstage-y += ../common/cbmem.c -romstage-y += ../common/clkbuf.c -romstage-y += ../common/dram_init.c -romstage-y += ../common/dramc_param.c -romstage-y += emi.c -romstage-y += ../common/memory.c -romstage-y += ../common/memory_test.c -romstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c -romstage-y += ../common/pll.c pll.c -romstage-y += scp.c -romstage-y += ../common/pmif.c ../common/pmif_clk.c pmif_clk.c -romstage-y += ../common/pmif_spi.c pmif_spi.c -romstage-y += ../common/pmif_spmi.c pmif_spmi.c -romstage-y += ../common/mt6315.c mt6315.c -romstage-y += ../common/mt6359p.c mt6359p.c -romstage-y += mt6360.c -romstage-y += mt6691.c -romstage-y += ../common/rtc.c ../common/rtc_osc_init.c ../common/rtc_mt6359p.c - -ramstage-y += apusys.c -ramstage-y += apusys_devapc.c -ramstage-y += ../common/auxadc.c -ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += ../common/bl31.c -ramstage-y += ../common/early_init.c -ramstage-y += ../common/ddp.c ddp.c -ramstage-y += ../common/devapc.c devapc.c -ramstage-y += ../common/dfd.c -ramstage-y += ../common/display.c -ramstage-y += ../common/dpm.c -ramstage-$(CONFIG_DPM_FOUR_CHANNEL) += ../common/dpm_4ch.c -ramstage-y += ../common/dp/dp_intf.c ../common/dp/dptx.c ../common/dp/dptx_hal.c dp_intf.c -ramstage-y += emi.c -ramstage-y += hdmi.c -ramstage-y += ../common/mcu.c -ramstage-y += ../common/mcupm.c -ramstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c -ramstage-$(CONFIG_COMMONLIB_STORAGE_MMC) += ../common/msdc.c msdc.c -ramstage-y += mt6360.c -ramstage-y += ../common/mtcmos.c mtcmos.c -ramstage-$(CONFIG_PCI) += ../common/pcie.c pcie.c -ramstage-y += ../common/pll.c pll.c -ramstage-y += ../common/pmif.c -ramstage-y += ../common/rtc.c ../common/rtc_mt6359p.c -ramstage-y += soc.c -ramstage-y += ../common/spm.c spm.c -ramstage-y += ../common/sspm.c -ramstage-y += ../common/ufs.c -ramstage-y += ../common/usb.c usb.c - -CPPFLAGS_common += -Isrc/soc/mediatek/mt8195/include -CPPFLAGS_common += -Isrc/soc/mediatek/common/dp/include -CPPFLAGS_common += -Isrc/soc/mediatek/common/include -CPPFLAGS_common += -Isrc/vendorcode/mediatek/mt8195/include - -BL31_MAKEARGS += PLAT=mt8195 - -MT8195_BLOB_DIR := 3rdparty/blobs/soc/mediatek/mt8195 - -mcu-firmware-files := \ - $(CONFIG_DPM_DM_FIRMWARE) \ - $(CONFIG_DPM_PM_FIRMWARE) \ - $(CONFIG_MCUPM_FIRMWARE) \ - $(CONFIG_SSPM_FIRMWARE) \ - $(CONFIG_SPM_FIRMWARE) - -$(foreach fw, $(call strip_quotes,$(mcu-firmware-files)), \ - $(eval $(fw)-file := $(MT8195_BLOB_DIR)/$(fw)) \ - $(eval $(fw)-type := raw) \ - $(eval $(fw)-compression := LZ4) \ - $(if $(wildcard $($(fw)-file)), $(eval cbfs-files-y += $(fw)), ) \ -) - -DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram -$(DRAM_CBFS)-file := $(MT8195_BLOB_DIR)/dram.elf -$(DRAM_CBFS)-type := stage -$(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG) -ifneq ($(wildcard $($(DRAM_CBFS)-file)),) - cbfs-files-y += $(DRAM_CBFS) -endif - -$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin - ./util/mtkheader/gen-bl-img.py mt8183 sf $< $@ - -endif diff --git a/src/soc/mediatek/mt8195/Makefile.mk b/src/soc/mediatek/mt8195/Makefile.mk new file mode 100644 index 0000000000..56a10bc2f2 --- /dev/null +++ b/src/soc/mediatek/mt8195/Makefile.mk @@ -0,0 +1,104 @@ +## SPDX-License-Identifier: GPL-2.0-only +ifeq ($(CONFIG_SOC_MEDIATEK_MT8195),y) + +# for bootblock, verstage, romstage, ramstage +all-y += ../common/flash_controller.c +all-y += ../common/gpio.c ../common/gpio_op.c gpio.c +all-y += ../common/i2c.c i2c.c +all-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c +all-y += ../common/timer.c ../common/timer_prepare.c +all-y += ../common/uart.c + +bootblock-y += bootblock.c +bootblock-y += ../common/early_init.c +bootblock-y += ../common/eint_event.c +bootblock-y += ../common/mmu_operations.c +bootblock-$(CONFIG_PCI) += pcie.c +bootblock-y += ../common/pll.c pll.c +bootblock-y += ../common/tracker.c ../common/tracker_v2.c +bootblock-y += ../common/wdt.c ../common/wdt_req.c wdt.c + +romstage-y += ../common/cbmem.c +romstage-y += ../common/clkbuf.c +romstage-y += ../common/dram_init.c +romstage-y += ../common/dramc_param.c +romstage-y += emi.c +romstage-y += ../common/memory.c +romstage-y += ../common/memory_test.c +romstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c +romstage-y += ../common/pll.c pll.c +romstage-y += scp.c +romstage-y += ../common/pmif.c ../common/pmif_clk.c pmif_clk.c +romstage-y += ../common/pmif_spi.c pmif_spi.c +romstage-y += ../common/pmif_spmi.c pmif_spmi.c +romstage-y += ../common/mt6315.c mt6315.c +romstage-y += ../common/mt6359p.c mt6359p.c +romstage-y += mt6360.c +romstage-y += mt6691.c +romstage-y += ../common/rtc.c ../common/rtc_osc_init.c ../common/rtc_mt6359p.c + +ramstage-y += apusys.c +ramstage-y += apusys_devapc.c +ramstage-y += ../common/auxadc.c +ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += ../common/bl31.c +ramstage-y += ../common/early_init.c +ramstage-y += ../common/ddp.c ddp.c +ramstage-y += ../common/devapc.c devapc.c +ramstage-y += ../common/dfd.c +ramstage-y += ../common/display.c +ramstage-y += ../common/dpm.c +ramstage-$(CONFIG_DPM_FOUR_CHANNEL) += ../common/dpm_4ch.c +ramstage-y += ../common/dp/dp_intf.c ../common/dp/dptx.c ../common/dp/dptx_hal.c dp_intf.c +ramstage-y += emi.c +ramstage-y += hdmi.c +ramstage-y += ../common/mcu.c +ramstage-y += ../common/mcupm.c +ramstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c +ramstage-$(CONFIG_COMMONLIB_STORAGE_MMC) += ../common/msdc.c msdc.c +ramstage-y += mt6360.c +ramstage-y += ../common/mtcmos.c mtcmos.c +ramstage-$(CONFIG_PCI) += ../common/pcie.c pcie.c +ramstage-y += ../common/pll.c pll.c +ramstage-y += ../common/pmif.c +ramstage-y += ../common/rtc.c ../common/rtc_mt6359p.c +ramstage-y += soc.c +ramstage-y += ../common/spm.c spm.c +ramstage-y += ../common/sspm.c +ramstage-y += ../common/ufs.c +ramstage-y += ../common/usb.c usb.c + +CPPFLAGS_common += -Isrc/soc/mediatek/mt8195/include +CPPFLAGS_common += -Isrc/soc/mediatek/common/dp/include +CPPFLAGS_common += -Isrc/soc/mediatek/common/include +CPPFLAGS_common += -Isrc/vendorcode/mediatek/mt8195/include + +BL31_MAKEARGS += PLAT=mt8195 + +MT8195_BLOB_DIR := 3rdparty/blobs/soc/mediatek/mt8195 + +mcu-firmware-files := \ + $(CONFIG_DPM_DM_FIRMWARE) \ + $(CONFIG_DPM_PM_FIRMWARE) \ + $(CONFIG_MCUPM_FIRMWARE) \ + $(CONFIG_SSPM_FIRMWARE) \ + $(CONFIG_SPM_FIRMWARE) + +$(foreach fw, $(call strip_quotes,$(mcu-firmware-files)), \ + $(eval $(fw)-file := $(MT8195_BLOB_DIR)/$(fw)) \ + $(eval $(fw)-type := raw) \ + $(eval $(fw)-compression := LZ4) \ + $(if $(wildcard $($(fw)-file)), $(eval cbfs-files-y += $(fw)), ) \ +) + +DRAM_CBFS := $(CONFIG_CBFS_PREFIX)/dram +$(DRAM_CBFS)-file := $(MT8195_BLOB_DIR)/dram.elf +$(DRAM_CBFS)-type := stage +$(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG) +ifneq ($(wildcard $($(DRAM_CBFS)-file)),) + cbfs-files-y += $(DRAM_CBFS) +endif + +$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin + ./util/mtkheader/gen-bl-img.py mt8183 sf $< $@ + +endif -- cgit v1.2.3