Daniel Schwierzeck | 17def7d | 2014-11-21 23:51:33 +0100 | [diff] [blame] | 1 | # |
| 2 | # SPDX-License-Identifier: GPL-2.0+ |
| 3 | # |
| 4 | |
Masahiro Yamada | 126f359 | 2015-02-27 02:40:33 +0900 | [diff] [blame^] | 5 | # This selects which instruction set is used. |
| 6 | arch-$(CONFIG_CPU_ARM720T) =-march=armv4 |
| 7 | arch-$(CONFIG_CPU_ARM920T) =-march=armv4 |
| 8 | arch-$(CONFIG_CPU_ARM926EJS) =-march=armv5te |
| 9 | arch-$(CONFIG_CPU_ARM946ES) =-march=armv4 |
| 10 | arch-$(CONFIG_CPU_SA1100) =-march=armv4 |
| 11 | arch-$(CONFIG_CPU_PXA) = |
| 12 | arch-$(CONFIG_CPU_ARM1136) =-march=armv5 |
| 13 | arch-$(CONFIG_CPU_ARM1176) =-march=armv5t |
| 14 | arch-$(CONFIG_CPU_V7) =$(call cc-option, -march=armv7-a, -march=armv5) |
| 15 | arch-$(CONFIG_ARM64) =-march=armv8-a |
| 16 | |
| 17 | # Evaluate arch cc-option calls now |
| 18 | arch-y := $(arch-y) |
| 19 | |
| 20 | # This selects how we optimise for the processor. |
| 21 | tune-$(CONFIG_CPU_ARM720T) =-mtune=arm7tdmi |
| 22 | tune-$(CONFIG_CPU_ARM920T) = |
| 23 | tune-$(CONFIG_CPU_ARM926EJS) = |
| 24 | tune-$(CONFIG_CPU_ARM946ES) = |
| 25 | tune-$(CONFIG_CPU_SA1100) =-mtune=strongarm1100 |
| 26 | tune-$(CONFIG_CPU_PXA) =-mcpu=xscale |
| 27 | tune-$(CONFIG_CPU_ARM1136) = |
| 28 | tune-$(CONFIG_CPU_ARM1176) = |
| 29 | tune-$(CONFIG_CPU_V7) = |
| 30 | tune-$(CONFIG_ARM64) = |
| 31 | |
| 32 | # Evaluate tune cc-option calls now |
| 33 | tune-y := $(tune-y) |
| 34 | |
| 35 | PLATFORM_CPPFLAGS += $(arch-y) $(tune-y) |
| 36 | |
Masahiro Yamada | 0841ab4 | 2015-02-20 17:04:02 +0900 | [diff] [blame] | 37 | # Machine directory name. This list is sorted alphanumerically |
| 38 | # by CONFIG_* macro name. |
Masahiro Yamada | e77d1d9 | 2015-02-20 17:04:03 +0900 | [diff] [blame] | 39 | machine-$(CONFIG_ARCH_AT91) += at91 |
Masahiro Yamada | 3644548 | 2015-02-20 17:04:05 +0900 | [diff] [blame] | 40 | machine-$(CONFIG_ARCH_DAVINCI) += davinci |
Masahiro Yamada | 95ec48b | 2015-02-20 17:04:08 +0900 | [diff] [blame] | 41 | machine-$(CONFIG_ARCH_HIGHBANK) += highbank |
Masahiro Yamada | f058b79 | 2015-02-20 17:04:11 +0900 | [diff] [blame] | 42 | machine-$(CONFIG_ARCH_KEYSTONE) += keystone |
Masahiro Yamada | 5e5e23a | 2015-02-20 17:04:06 +0900 | [diff] [blame] | 43 | # TODO: rename CONFIG_KIRKWOOD -> CONFIG_ARCH_KIRKWOOD |
| 44 | machine-$(CONFIG_KIRKWOOD) += kirkwood |
Masahiro Yamada | ed1632a | 2015-02-20 17:04:04 +0900 | [diff] [blame] | 45 | # TODO: rename CONFIG_TEGRA -> CONFIG_ARCH_TEGRA |
Masahiro Yamada | 5d083e1 | 2015-02-20 17:04:07 +0900 | [diff] [blame] | 46 | machine-$(CONFIG_ARCH_NOMADIK) += nomadik |
Masahiro Yamada | 2253764 | 2015-02-20 17:04:09 +0900 | [diff] [blame] | 47 | # TODO: rename CONFIG_ORION5X -> CONFIG_ARCH_ORION5X |
| 48 | machine-$(CONFIG_ORION5X) += orion5x |
Masahiro Yamada | ed1632a | 2015-02-20 17:04:04 +0900 | [diff] [blame] | 49 | machine-$(CONFIG_TEGRA) += tegra |
Masahiro Yamada | f856398 | 2015-02-27 02:26:42 +0900 | [diff] [blame] | 50 | machine-$(CONFIG_ARCH_UNIPHIER) += uniphier |
Masahiro Yamada | 0f2ec0a | 2015-02-20 17:04:10 +0900 | [diff] [blame] | 51 | machine-$(CONFIG_ARCH_VERSATILE) += versatile |
Masahiro Yamada | 0841ab4 | 2015-02-20 17:04:02 +0900 | [diff] [blame] | 52 | |
| 53 | machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) |
| 54 | |
Masahiro Yamada | 41aa49e | 2015-02-20 17:04:19 +0900 | [diff] [blame] | 55 | PLATFORM_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) |
| 56 | |
Masahiro Yamada | 0841ab4 | 2015-02-20 17:04:02 +0900 | [diff] [blame] | 57 | libs-y += $(machdirs) |
| 58 | |
Daniel Schwierzeck | 17def7d | 2014-11-21 23:51:33 +0100 | [diff] [blame] | 59 | head-y := arch/arm/cpu/$(CPU)/start.o |
| 60 | |
| 61 | ifeq ($(CONFIG_SPL_BUILD),y) |
| 62 | ifneq ($(CONFIG_SPL_START_S_PATH),) |
| 63 | head-y := $(CONFIG_SPL_START_S_PATH:"%"=%)/start.o |
| 64 | endif |
| 65 | endif |
| 66 | |
| 67 | libs-y += arch/arm/cpu/$(CPU)/ |
| 68 | libs-y += arch/arm/cpu/ |
| 69 | libs-y += arch/arm/lib/ |
| 70 | |
| 71 | ifeq ($(CONFIG_SPL_BUILD),y) |
| 72 | ifneq (,$(CONFIG_MX23)$(CONFIG_MX35)$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35)) |
| 73 | libs-y += arch/arm/imx-common/ |
| 74 | endif |
| 75 | else |
| 76 | ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35 mxs vf610)) |
| 77 | libs-y += arch/arm/imx-common/ |
| 78 | endif |
| 79 | endif |
| 80 | |
| 81 | ifneq (,$(filter $(SOC), armada-xp kirkwood)) |
| 82 | libs-y += arch/arm/mvebu-common/ |
| 83 | endif |
Masahiro Yamada | 0841ab4 | 2015-02-20 17:04:02 +0900 | [diff] [blame] | 84 | |
| 85 | # deprecated |
| 86 | -include $(machdirs)/config.mk |