1 # SPDX-License-Identifier: GPL-2.0+
3 ifeq ($(CONFIG_XPL_BUILD)$(CONFIG_ARCH_TEGRA),yy)
8 # This selects which instruction set is used.
9 arch-$(CONFIG_CPU_ARM720T) =-march=armv4
10 arch-$(CONFIG_CPU_ARM920T) =-march=armv4t
11 arch-$(CONFIG_CPU_ARM926EJS) =-march=armv5te
12 arch-$(CONFIG_CPU_ARM946ES) =-march=armv5te
13 arch-$(CONFIG_CPU_ARM1136) =-march=armv5t
14 arch-$(CONFIG_CPU_ARM1176) =-march=armv5t
15 arch-$(CONFIG_CPU_V7A) =$(call cc-option, -march=armv7-a, \
16 $(call cc-option, -march=armv7))
17 arch-$(CONFIG_CPU_V7M) =-march=armv7-m
18 arch-$(CONFIG_CPU_V7R) =-march=armv7-r
19 ifeq ($(CONFIG_ARM64_CRC32),y)
20 arch-$(CONFIG_ARM64) =-march=armv8-a+crc
22 arch-$(CONFIG_ARM64) =-march=armv8-a
25 # On Tegra systems we must build SPL for the armv4 core on the device
26 # but otherwise we can use the value in CONFIG_SYS_ARM_ARCH
27 ifeq ($(CONFIG_XPL_BUILD)$(CONFIG_ARCH_TEGRA),yy)
28 arch-y += -D__LINUX_ARM_ARCH__=4
30 arch-y += -D__LINUX_ARM_ARCH__=$(CONFIG_SYS_ARM_ARCH)
33 # Evaluate arch cc-option calls now
36 # This selects how we optimise for the processor.
37 tune-$(CONFIG_CPU_ARM720T) =-mtune=arm7tdmi
38 tune-$(CONFIG_CPU_ARM920T) =
39 tune-$(CONFIG_CPU_ARM926EJS) =
40 tune-$(CONFIG_CPU_ARM946ES) =
41 tune-$(CONFIG_CPU_ARM1136) =
42 tune-$(CONFIG_CPU_ARM1176) =
43 tune-$(CONFIG_CPU_V7A) =-mtune=generic-armv7-a
44 tune-$(CONFIG_CPU_V7R) =
45 tune-$(CONFIG_ARM64) =
47 # Evaluate tune cc-option calls now
50 PLATFORM_CPPFLAGS += $(arch-y) $(tune-y)
52 # Machine directory name. This list is sorted alphanumerically
53 # by CONFIG_* macro name.
54 machine-$(CONFIG_ARCH_APPLE) += apple
55 machine-$(CONFIG_ARCH_ASPEED) += aspeed
56 machine-$(CONFIG_ARCH_AT91) += at91
57 machine-$(CONFIG_ARCH_BCM283X) += bcm283x
58 machine-$(CONFIG_ARCH_BCMBCA) += bcmbca
59 machine-$(CONFIG_ARCH_BCMSTB) += bcmstb
60 machine-$(CONFIG_ARCH_DAVINCI) += davinci
61 machine-$(CONFIG_ARCH_EXYNOS) += exynos
62 machine-$(CONFIG_ARCH_GXP) += hpe
63 machine-$(CONFIG_ARCH_HIGHBANK) += highbank
64 machine-$(CONFIG_ARCH_HISTB) += histb
65 machine-$(CONFIG_ARCH_IPQ40XX) += ipq40xx
66 machine-$(CONFIG_ARCH_K3) += k3
67 machine-$(CONFIG_ARCH_KEYSTONE) += keystone
68 machine-$(CONFIG_ARCH_KIRKWOOD) += kirkwood
69 machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx
70 machine-$(CONFIG_ARCH_MEDIATEK) += mediatek
71 machine-$(CONFIG_ARCH_MESON) += meson
72 machine-$(CONFIG_ARCH_MMP) += mmp
73 machine-$(CONFIG_ARCH_MVEBU) += mvebu
74 machine-$(CONFIG_ARCH_NEXELL) += nexell
75 machine-$(CONFIG_ARCH_NPCM) += npcm
76 machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2
77 machine-$(CONFIG_ARCH_ORION5X) += orion5x
78 machine-$(CONFIG_ARCH_OWL) += owl
79 machine-$(CONFIG_ARCH_RENESAS) += renesas
80 machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip
81 machine-$(CONFIG_ARCH_S5PC1XX) += s5pc1xx
82 machine-$(CONFIG_ARCH_SC5XX) += sc5xx
83 machine-$(CONFIG_ARCH_SNAPDRAGON) += snapdragon
84 machine-$(CONFIG_ARCH_SOCFPGA) += socfpga
85 machine-$(CONFIG_ARCH_STM32) += stm32
86 machine-$(CONFIG_ARCH_STM32MP) += stm32mp
87 machine-$(CONFIG_ARCH_SUNXI) += sunxi
88 machine-$(CONFIG_ARCH_TEGRA) += tegra
89 machine-$(CONFIG_ARCH_U8500) += u8500
90 machine-$(CONFIG_ARCH_OCTEONTX) += octeontx
91 machine-$(CONFIG_ARCH_OCTEONTX2) += octeontx2
92 machine-$(CONFIG_ARCH_UNIPHIER) += uniphier
93 machine-$(CONFIG_ARCH_VERSAL) += versal
94 machine-$(CONFIG_ARCH_VERSAL2) += versal2
95 machine-$(CONFIG_ARCH_VERSAL_NET) += versal-net
96 machine-$(CONFIG_ARCH_ZYNQ) += zynq
97 machine-$(CONFIG_ARCH_ZYNQMP) += zynqmp
98 machine-$(CONFIG_ARCH_ZYNQMP_R5) += zynqmp-r5
100 machine-$(CONFIG_MACH_IMX) += imx
102 machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
104 PLATFORM_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
106 libs-y += $(machdirs)
108 head-y := arch/arm/cpu/$(CPU)/start.o
110 ifeq ($(CONFIG_XPL_BUILD),y)
111 ifeq ($(CONFIG_SYS_SOC)$(CONFIG_SPL_FRAMEWORK),"mxs")
112 head-y := arch/arm/cpu/arm926ejs/mxs/start.o
116 libs-y += arch/arm/cpu/$(CPU)/
117 libs-y += arch/arm/cpu/
118 libs-y += arch/arm/lib/
120 ifneq (,$(filter $(SOC), kirkwood))
121 libs-y += arch/arm/mach-mvebu/
125 -include $(machdirs)/config.mk