blob: 54be9250c2acef46c2355d0f61dff74a77468b3c [file] [log] [blame]
Daniel Schwierzeck17def7d2014-11-21 23:51:33 +01001#
2# SPDX-License-Identifier: GPL-2.0+
3#
4
Masahiro Yamada126f3592015-02-27 02:40:33 +09005# This selects which instruction set is used.
6arch-$(CONFIG_CPU_ARM720T) =-march=armv4
7arch-$(CONFIG_CPU_ARM920T) =-march=armv4
8arch-$(CONFIG_CPU_ARM926EJS) =-march=armv5te
9arch-$(CONFIG_CPU_ARM946ES) =-march=armv4
10arch-$(CONFIG_CPU_SA1100) =-march=armv4
11arch-$(CONFIG_CPU_PXA) =
12arch-$(CONFIG_CPU_ARM1136) =-march=armv5
13arch-$(CONFIG_CPU_ARM1176) =-march=armv5t
14arch-$(CONFIG_CPU_V7) =$(call cc-option, -march=armv7-a, -march=armv5)
15arch-$(CONFIG_ARM64) =-march=armv8-a
16
17# Evaluate arch cc-option calls now
18arch-y := $(arch-y)
19
20# This selects how we optimise for the processor.
21tune-$(CONFIG_CPU_ARM720T) =-mtune=arm7tdmi
22tune-$(CONFIG_CPU_ARM920T) =
23tune-$(CONFIG_CPU_ARM926EJS) =
24tune-$(CONFIG_CPU_ARM946ES) =
25tune-$(CONFIG_CPU_SA1100) =-mtune=strongarm1100
26tune-$(CONFIG_CPU_PXA) =-mcpu=xscale
27tune-$(CONFIG_CPU_ARM1136) =
28tune-$(CONFIG_CPU_ARM1176) =
29tune-$(CONFIG_CPU_V7) =
30tune-$(CONFIG_ARM64) =
31
32# Evaluate tune cc-option calls now
33tune-y := $(tune-y)
34
35PLATFORM_CPPFLAGS += $(arch-y) $(tune-y)
36
Masahiro Yamada0841ab42015-02-20 17:04:02 +090037# Machine directory name. This list is sorted alphanumerically
38# by CONFIG_* macro name.
Masahiro Yamadae77d1d92015-02-20 17:04:03 +090039machine-$(CONFIG_ARCH_AT91) += at91
Masahiro Yamada36445482015-02-20 17:04:05 +090040machine-$(CONFIG_ARCH_DAVINCI) += davinci
Masahiro Yamada95ec48b2015-02-20 17:04:08 +090041machine-$(CONFIG_ARCH_HIGHBANK) += highbank
Masahiro Yamadaf058b792015-02-20 17:04:11 +090042machine-$(CONFIG_ARCH_KEYSTONE) += keystone
Masahiro Yamada5e5e23a2015-02-20 17:04:06 +090043# TODO: rename CONFIG_KIRKWOOD -> CONFIG_ARCH_KIRKWOOD
44machine-$(CONFIG_KIRKWOOD) += kirkwood
Masahiro Yamadaed1632a2015-02-20 17:04:04 +090045# TODO: rename CONFIG_TEGRA -> CONFIG_ARCH_TEGRA
Masahiro Yamada5d083e12015-02-20 17:04:07 +090046machine-$(CONFIG_ARCH_NOMADIK) += nomadik
Masahiro Yamada22537642015-02-20 17:04:09 +090047# TODO: rename CONFIG_ORION5X -> CONFIG_ARCH_ORION5X
48machine-$(CONFIG_ORION5X) += orion5x
Masahiro Yamadaed1632a2015-02-20 17:04:04 +090049machine-$(CONFIG_TEGRA) += tegra
Masahiro Yamadaf8563982015-02-27 02:26:42 +090050machine-$(CONFIG_ARCH_UNIPHIER) += uniphier
Masahiro Yamada0f2ec0a2015-02-20 17:04:10 +090051machine-$(CONFIG_ARCH_VERSATILE) += versatile
Masahiro Yamada0841ab42015-02-20 17:04:02 +090052
53machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
54
Masahiro Yamada41aa49e2015-02-20 17:04:19 +090055PLATFORM_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
56
Masahiro Yamada0841ab42015-02-20 17:04:02 +090057libs-y += $(machdirs)
58
Daniel Schwierzeck17def7d2014-11-21 23:51:33 +010059head-y := arch/arm/cpu/$(CPU)/start.o
60
61ifeq ($(CONFIG_SPL_BUILD),y)
62ifneq ($(CONFIG_SPL_START_S_PATH),)
63head-y := $(CONFIG_SPL_START_S_PATH:"%"=%)/start.o
64endif
65endif
66
67libs-y += arch/arm/cpu/$(CPU)/
68libs-y += arch/arm/cpu/
69libs-y += arch/arm/lib/
70
71ifeq ($(CONFIG_SPL_BUILD),y)
72ifneq (,$(CONFIG_MX23)$(CONFIG_MX35)$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35))
73libs-y += arch/arm/imx-common/
74endif
75else
76ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35 mxs vf610))
77libs-y += arch/arm/imx-common/
78endif
79endif
80
81ifneq (,$(filter $(SOC), armada-xp kirkwood))
82libs-y += arch/arm/mvebu-common/
83endif
Masahiro Yamada0841ab42015-02-20 17:04:02 +090084
85# deprecated
86-include $(machdirs)/config.mk