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