1e19db555SDaniel Schwierzeck# 2e19db555SDaniel Schwierzeck# SPDX-License-Identifier: GPL-2.0+ 3e19db555SDaniel Schwierzeck# 4e19db555SDaniel Schwierzeck 5eef88dfbSDaniel Schwierzeckhead-y := arch/mips/cpu/start.o 6e19db555SDaniel Schwierzeck 7ecc9d260SMarek Vasutifeq ($(CONFIG_SPL_BUILD),y) 8ecc9d260SMarek Vasutifneq ($(CONFIG_SPL_START_S_PATH),) 9ecc9d260SMarek Vasuthead-y := $(CONFIG_SPL_START_S_PATH:"%"=%)/start.o 10ecc9d260SMarek Vasutendif 11ecc9d260SMarek Vasutendif 12ecc9d260SMarek Vasut 13eef88dfbSDaniel Schwierzecklibs-y += arch/mips/cpu/ 14e19db555SDaniel Schwierzecklibs-y += arch/mips/lib/ 15d9a4a622SDaniel Schwierzeck 166479b691SDaniel Schwierzeckmachine-$(CONFIG_SOC_AU1X00) += au1x00 171d3d0f1fSWills Wangmachine-$(CONFIG_ARCH_ATH79) += ath79 18*ee422142SÁlvaro Fernández Rojasmachine-$(CONFIG_ARCH_BMIPS) += bmips 1932c1a6eeSPurna Chandra Mandalmachine-$(CONFIG_MACH_PIC32) += pic32 206479b691SDaniel Schwierzeck 216479b691SDaniel Schwierzeckmachdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y)) 226479b691SDaniel Schwierzecklibs-y += $(machdirs) 236479b691SDaniel Schwierzeck 246479b691SDaniel SchwierzeckPLATFORM_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) 250315a289SDaniel Schwierzeck 260315a289SDaniel Schwierzeck# Optimize for MIPS architectures 270315a289SDaniel Schwierzeckarch-$(CONFIG_CPU_MIPS32_R1) += -march=mips32 -Wa,-mips32 280315a289SDaniel Schwierzeckarch-$(CONFIG_CPU_MIPS32_R2) += -march=mips32r2 -Wa,-mips32r2 29c52ebea1SPaul Burtonarch-$(CONFIG_CPU_MIPS32_R6) += -march=mips32r6 -Wa,-mips32r6 300315a289SDaniel Schwierzeckarch-$(CONFIG_CPU_MIPS64_R1) += -march=mips64 -Wa,-mips64 310315a289SDaniel Schwierzeckarch-$(CONFIG_CPU_MIPS64_R2) += -march=mips64r2 -Wa,-mips64r2 32c52ebea1SPaul Burtonarch-$(CONFIG_CPU_MIPS64_R6) += -march=mips64r6 -Wa,-mips64r6 330315a289SDaniel Schwierzeck 340315a289SDaniel Schwierzeck# Allow extra optimization for specific CPUs/SoCs 350315a289SDaniel Schwierzecktune-$(CONFIG_MIPS_TUNE_4KC) += -mtune=4kc 360315a289SDaniel Schwierzecktune-$(CONFIG_MIPS_TUNE_14KC) += -mtune=14kc 370315a289SDaniel Schwierzecktune-$(CONFIG_MIPS_TUNE_24KC) += -mtune=24kc 385f9cc363SDaniel Schwierzecktune-$(CONFIG_MIPS_TUNE_34KC) += -mtune=34kc 390a0a958bSMarek Vasuttune-$(CONFIG_MIPS_TUNE_74KC) += -mtune=74kc 400315a289SDaniel Schwierzeck 4123ff8633SDaniel Schwierzeck# Include default header files 4223ff8633SDaniel Schwierzeckcflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic 4323ff8633SDaniel Schwierzeck 4423ff8633SDaniel SchwierzeckPLATFORM_CPPFLAGS += $(arch-y) $(tune-y) $(cflags-y) 45