diff options
author | Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | 2015-12-26 19:55:37 +0100 |
---|---|---|
committer | Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | 2016-01-16 21:06:46 +0100 |
commit | 0315a28909aa9781706bcd5743f2665220b6b099 (patch) | |
tree | c87b0a889f15f974f0082f9b02b9c7788c6ed265 /arch | |
parent | 76ada5f8b7bb4b295ced087bd3c34eb8161a1a75 (diff) | |
download | u-boot-0315a28909aa9781706bcd5743f2665220b6b099.zip u-boot-0315a28909aa9781706bcd5743f2665220b6b099.tar.gz u-boot-0315a28909aa9781706bcd5743f2665220b6b099.tar.bz2 |
MIPS: Kconfig: optimize gcc -march and -mtune setup
Move setup of -march to arch/mips/Makefile and follow the design on ARM.
Also add a possibility to chose specific CPU tune options.
Signed-off-by: Wills Wang <wills.wang@live.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/Kconfig | 12 | ||||
-rw-r--r-- | arch/mips/Makefile | 13 | ||||
-rw-r--r-- | arch/mips/config.mk | 6 | ||||
-rw-r--r-- | arch/mips/mach-au1x00/config.mk | 8 |
4 files changed, 24 insertions, 15 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 7f7e258..388e4c0 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -43,6 +43,7 @@ config TARGET_DBAU1X00 select SUPPORTS_CPU_MIPS32_R1 select SUPPORTS_CPU_MIPS32_R2 select SYS_MIPS_CACHE_INIT_RAM_LOAD + select MIPS_TUNE_4KC config TARGET_PB1X00 bool "Support pb1x00" @@ -50,7 +51,7 @@ config TARGET_PB1X00 select SUPPORTS_CPU_MIPS32_R1 select SUPPORTS_CPU_MIPS32_R2 select SYS_MIPS_CACHE_INIT_RAM_LOAD - + select MIPS_TUNE_4KC endchoice @@ -174,6 +175,15 @@ config CPU_MIPS64 bool default y if CPU_MIPS64_R1 || CPU_MIPS64_R2 +config MIPS_TUNE_4KC + bool + +config MIPS_TUNE_14KC + bool + +config MIPS_TUNE_24KC + bool + config 32BIT bool diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 6a9f798..90cd590 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -13,3 +13,16 @@ 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_MIPS64_R1) += -march=mips64 -Wa,-mips64 +arch-$(CONFIG_CPU_MIPS64_R2) += -march=mips64r2 -Wa,-mips64r2 + +# 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 + +PLATFORM_CPPFLAGS += $(arch-y) $(tune-y) diff --git a/arch/mips/config.mk b/arch/mips/config.mk index b78d495..609a998 100644 --- a/arch/mips/config.mk +++ b/arch/mips/config.mk @@ -35,12 +35,6 @@ PLATFORM_LDFLAGS += -m$(64bit-emul) OBJCOPYFLAGS += -O $(64bit-bfd) endif -cpuflags-$(CONFIG_CPU_MIPS32_R1) += -march=mips32 -Wa,-mips32 -cpuflags-$(CONFIG_CPU_MIPS32_R2) += -march=mips32r2 -Wa,-mips32r2 -cpuflags-$(CONFIG_CPU_MIPS64_R1) += -march=mips64 -Wa,-mips64 -cpuflags-$(CONFIG_CPU_MIPS64_R2) += -march=mips64r2 -Wa,-mips64r2 -PLATFORM_CPPFLAGS += $(cpuflags-y) - PLATFORM_CPPFLAGS += -D__MIPS__ # diff --git a/arch/mips/mach-au1x00/config.mk b/arch/mips/mach-au1x00/config.mk deleted file mode 100644 index 5c89129..0000000 --- a/arch/mips/mach-au1x00/config.mk +++ /dev/null @@ -1,8 +0,0 @@ -# -# (C) Copyright 2011 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -PLATFORM_CPPFLAGS += -mtune=4kc |