X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=arch%2Fmips%2FMakefile;h=af3f227436ee3b80440c5c7e08ead4ddf506efbe;hb=afe18f205e269682edd680cb4a5bcbe2094ea58b;hp=43f0f5c5046b0361dfd20b8e5058edd046bbf5ad;hpb=37ffffb98d78c46c840fa6e3c835d915c4247827;p=oweals%2Fu-boot.git diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 43f0f5c504..af3f227436 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -1,10 +1,44 @@ -# -# SPDX-License-Identifier: GPL-2.0+ -# +# SPDX-License-Identifier: GPL-2.0+ head-y := arch/mips/cpu/start.o +ifeq ($(CONFIG_SPL_BUILD),y) +ifneq ($(CONFIG_SPL_START_S_PATH),) +head-y := $(CONFIG_SPL_START_S_PATH:"%"=%)/start.o +endif +endif + libs-y += arch/mips/cpu/ libs-y += arch/mips/lib/ -libs-$(CONFIG_SOC_AU1X00) += arch/mips/mach-au1x00/ +machine-$(CONFIG_ARCH_ATH79) += ath79 +machine-$(CONFIG_ARCH_BMIPS) += bmips +machine-$(CONFIG_ARCH_JZ47XX) += jz47xx +machine-$(CONFIG_MACH_PIC32) += pic32 +machine-$(CONFIG_ARCH_MTMIPS) += mtmips +machine-$(CONFIG_ARCH_MSCC) += mscc + +machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y)) +libs-y += $(machdirs) + +PLATFORM_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) + +# Optimize for MIPS architectures +arch-$(CONFIG_CPU_MIPS32_R1) += -march=mips32 -Wa,-mips32 +arch-$(CONFIG_CPU_MIPS32_R2) += -march=mips32r2 -Wa,-mips32r2 +arch-$(CONFIG_CPU_MIPS32_R6) += -march=mips32r6 -Wa,-mips32r6 +arch-$(CONFIG_CPU_MIPS64_R1) += -march=mips64 -Wa,-mips64 +arch-$(CONFIG_CPU_MIPS64_R2) += -march=mips64r2 -Wa,-mips64r2 +arch-$(CONFIG_CPU_MIPS64_R6) += -march=mips64r6 -Wa,-mips64r6 + +# Allow extra optimization for specific CPUs/SoCs +tune-$(CONFIG_MIPS_TUNE_4KC) += -mtune=4kc +tune-$(CONFIG_MIPS_TUNE_14KC) += -mtune=14kc +tune-$(CONFIG_MIPS_TUNE_24KC) += -mtune=24kc +tune-$(CONFIG_MIPS_TUNE_34KC) += -mtune=34kc +tune-$(CONFIG_MIPS_TUNE_74KC) += -mtune=74kc + +# Include default header files +cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic + +PLATFORM_CPPFLAGS += $(arch-y) $(tune-y) $(cflags-y)