2018-05-06 21:58:06 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
2014-11-21 22:51:33 +00:00
|
|
|
|
2015-01-29 13:56:20 +00:00
|
|
|
head-y := arch/mips/cpu/start.o
|
2014-11-21 22:51:33 +00:00
|
|
|
|
2016-05-25 00:17:42 +00:00
|
|
|
ifeq ($(CONFIG_SPL_BUILD),y)
|
2022-05-28 16:40:40 +00:00
|
|
|
head-$(CONFIG_ARCH_JZ47XX) := arch/mips/mach-jz47xx/start.o
|
2016-05-25 00:17:42 +00:00
|
|
|
endif
|
|
|
|
|
2015-01-29 13:56:20 +00:00
|
|
|
libs-y += arch/mips/cpu/
|
2014-11-21 22:51:33 +00:00
|
|
|
libs-y += arch/mips/lib/
|
2015-01-29 13:47:01 +00:00
|
|
|
|
2016-03-16 08:59:52 +00:00
|
|
|
machine-$(CONFIG_ARCH_ATH79) += ath79
|
2017-04-24 22:39:20 +00:00
|
|
|
machine-$(CONFIG_ARCH_BMIPS) += bmips
|
2018-12-16 22:25:22 +00:00
|
|
|
machine-$(CONFIG_ARCH_JZ47XX) += jz47xx
|
2016-01-28 10:00:10 +00:00
|
|
|
machine-$(CONFIG_MACH_PIC32) += pic32
|
2019-04-30 03:13:58 +00:00
|
|
|
machine-$(CONFIG_ARCH_MTMIPS) += mtmips
|
2018-12-14 15:16:47 +00:00
|
|
|
machine-$(CONFIG_ARCH_MSCC) += mscc
|
2020-06-30 10:08:56 +00:00
|
|
|
machine-${CONFIG_ARCH_OCTEON} += octeon
|
2015-12-21 15:35:13 +00:00
|
|
|
|
|
|
|
machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y))
|
|
|
|
libs-y += $(machdirs)
|
|
|
|
|
|
|
|
PLATFORM_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
|
2015-12-26 18:55:37 +00:00
|
|
|
|
|
|
|
# Optimize for MIPS architectures
|
|
|
|
arch-$(CONFIG_CPU_MIPS32_R1) += -march=mips32 -Wa,-mips32
|
|
|
|
arch-$(CONFIG_CPU_MIPS32_R2) += -march=mips32r2 -Wa,-mips32r2
|
2016-05-16 09:52:12 +00:00
|
|
|
arch-$(CONFIG_CPU_MIPS32_R6) += -march=mips32r6 -Wa,-mips32r6
|
2015-12-26 18:55:37 +00:00
|
|
|
arch-$(CONFIG_CPU_MIPS64_R1) += -march=mips64 -Wa,-mips64
|
|
|
|
arch-$(CONFIG_CPU_MIPS64_R2) += -march=mips64r2 -Wa,-mips64r2
|
2016-05-16 09:52:12 +00:00
|
|
|
arch-$(CONFIG_CPU_MIPS64_R6) += -march=mips64r6 -Wa,-mips64r6
|
2020-06-30 10:08:56 +00:00
|
|
|
arch-${CONFIG_CPU_MIPS64_OCTEON} += -march=octeon2
|
2015-12-26 18:55:37 +00:00
|
|
|
|
|
|
|
# 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
|
2016-05-27 13:39:39 +00:00
|
|
|
tune-$(CONFIG_MIPS_TUNE_34KC) += -mtune=34kc
|
2016-05-06 18:10:33 +00:00
|
|
|
tune-$(CONFIG_MIPS_TUNE_74KC) += -mtune=74kc
|
2020-06-30 10:08:56 +00:00
|
|
|
tune-${CONFIG_MIPS_TUNE_OCTEON3} += -mtune=octeon2
|
2015-12-26 18:55:37 +00:00
|
|
|
|
2016-01-12 20:48:25 +00:00
|
|
|
# Include default header files
|
|
|
|
cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic
|
|
|
|
|
|
|
|
PLATFORM_CPPFLAGS += $(arch-y) $(tune-y) $(cflags-y)
|