2018-05-06 21:58:06 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
2014-11-21 22:51:33 +00:00
|
|
|
|
2020-05-06 12:02:41 +00:00
|
|
|
ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_ARCH_TEGRA),yy)
|
2018-04-26 12:51:26 +00:00
|
|
|
CONFIG_CPU_V7A=
|
2015-04-11 15:58:14 +00:00
|
|
|
CONFIG_CPU_ARM720T=y
|
|
|
|
endif
|
|
|
|
|
2015-02-26 17:40:33 +00:00
|
|
|
# This selects which instruction set is used.
|
|
|
|
arch-$(CONFIG_CPU_ARM720T) =-march=armv4
|
2016-02-09 15:48:29 +00:00
|
|
|
arch-$(CONFIG_CPU_ARM920T) =-march=armv4t
|
2015-02-26 17:40:33 +00:00
|
|
|
arch-$(CONFIG_CPU_ARM926EJS) =-march=armv5te
|
2016-04-30 12:45:59 +00:00
|
|
|
arch-$(CONFIG_CPU_ARM946ES) =-march=armv5te
|
2015-02-26 17:40:33 +00:00
|
|
|
arch-$(CONFIG_CPU_SA1100) =-march=armv4
|
|
|
|
arch-$(CONFIG_CPU_PXA) =
|
2019-12-07 08:14:50 +00:00
|
|
|
arch-$(CONFIG_CPU_ARM1136) =-march=armv5t
|
|
|
|
arch-$(CONFIG_CPU_ARM1176) =-march=armv5t
|
2018-04-26 12:51:26 +00:00
|
|
|
arch-$(CONFIG_CPU_V7A) =$(call cc-option, -march=armv7-a, \
|
2018-08-04 21:34:54 +00:00
|
|
|
$(call cc-option, -march=armv7))
|
2018-05-08 00:46:52 +00:00
|
|
|
arch-$(CONFIG_CPU_V7M) =-march=armv7-m
|
2018-04-26 12:51:29 +00:00
|
|
|
arch-$(CONFIG_CPU_V7R) =-march=armv7-r
|
2015-02-26 17:40:33 +00:00
|
|
|
arch-$(CONFIG_ARM64) =-march=armv8-a
|
|
|
|
|
2016-08-01 22:54:53 +00:00
|
|
|
# On Tegra systems we must build SPL for the armv4 core on the device
|
|
|
|
# but otherwise we can use the value in CONFIG_SYS_ARM_ARCH
|
2020-05-06 12:02:41 +00:00
|
|
|
ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_ARCH_TEGRA),yy)
|
2016-08-01 22:54:53 +00:00
|
|
|
arch-y += -D__LINUX_ARM_ARCH__=4
|
|
|
|
else
|
|
|
|
arch-y += -D__LINUX_ARM_ARCH__=$(CONFIG_SYS_ARM_ARCH)
|
|
|
|
endif
|
|
|
|
|
2015-02-26 17:40:33 +00:00
|
|
|
# Evaluate arch cc-option calls now
|
|
|
|
arch-y := $(arch-y)
|
|
|
|
|
|
|
|
# This selects how we optimise for the processor.
|
|
|
|
tune-$(CONFIG_CPU_ARM720T) =-mtune=arm7tdmi
|
|
|
|
tune-$(CONFIG_CPU_ARM920T) =
|
|
|
|
tune-$(CONFIG_CPU_ARM926EJS) =
|
|
|
|
tune-$(CONFIG_CPU_ARM946ES) =
|
|
|
|
tune-$(CONFIG_CPU_SA1100) =-mtune=strongarm1100
|
|
|
|
tune-$(CONFIG_CPU_PXA) =-mcpu=xscale
|
|
|
|
tune-$(CONFIG_CPU_ARM1136) =
|
|
|
|
tune-$(CONFIG_CPU_ARM1176) =
|
2018-08-04 21:34:54 +00:00
|
|
|
tune-$(CONFIG_CPU_V7A) =-mtune=generic-armv7-a
|
2018-04-26 12:51:29 +00:00
|
|
|
tune-$(CONFIG_CPU_V7R) =
|
2015-02-26 17:40:33 +00:00
|
|
|
tune-$(CONFIG_ARM64) =
|
|
|
|
|
|
|
|
# Evaluate tune cc-option calls now
|
|
|
|
tune-y := $(tune-y)
|
|
|
|
|
|
|
|
PLATFORM_CPPFLAGS += $(arch-y) $(tune-y)
|
|
|
|
|
ARM: prepare for moving SoC sources into mach-*
In U-boot, the directory structure, arch/$(ARCH)/cpu/$(CPU)/$(SOC)/
has been adopted except that $(CPU) is missing from some
architectures and $(SOC) is missing from some CPUs.
This structure did not fit very well in some cases.
[1] AT91
AT91 SoC family have been developed across some ARM processor
generations. Generally speaking, some IPs are often re-used in the
same SoC family (same SoC vendor) even when the main processor is
updated. As a result, a SoC-common directory is needed in the upper
level. Currently, AT91 source files are placed as follows:
arch/arm/cpu/arm920t/at91/*
arch/arm/cpu/arm926ejs/at91/*
arch/arm/cpu/armv7/at91/*
arch/arm/cpu/at91-common/*
Once directories are split, the motivation for refactorings across
CPU directories is lost. Some files in arm920t/at91/ and
arm926ejs/at91/ are so similar that they could be merged.
[2] Tegra
Tegra is a little bit special case where different CPUs are used for
SPL and the main U-boot. To obey the arch/$(ARCH)/cpu/$(CPU)/$(SOC)
structure, the source files must be placed across the CPUs,
again SoC-common directory is necessary in the upper level.
Moreover, there are several families in Tegra: Tegra20, Tegra30,
Tegra114, Tegra124. Here again, the tegra-common directory is needed
to contain commonly-used files.
Tegra directories have been sprinkled in the directory structure.
arch/arm/cpu/arm720t/tegra20
arch/arm/cpu/arm720t/tegra30
arch/arm/cpu/arm720t/tegra114
arch/arm/cpu/arm720t/tegra124
arch/arm/cpu/arm720t/tegra-common
arch/arm/cpu/armv7/tegra20
arch/arm/cpu/armv7/tegra30
arch/arm/cpu/armv7/tegra114
arch/arm/cpu/armv7/tegra124
arch/arm/cpu/armv7/tegra-common
arch/arm/cpu/tegra20-common
arch/arm/cpu/tegra30-common
arch/arm/cpu/tegra114-common
arch/arm/cpu/tegra124-common
arch/arm/cpu/tegra-common
As you see, splitting SoC code by the CPU is not going well,
especially for ARM.
Why don't we collect SoC-specific files into a single place?
A good example we can follow is Linux's arch/arm/mach-* structure.
This item was discussed in the following thread:
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/188548/
Looks like I got some positive responses and we are almost ready to
start this movement.
This commit prepares arch/arm/Makefile for describing machdirs in it.
After this commit, we can move SoC directory to arch/arm/mach-$(SOC)
in simple steps although some cases such as AT91 and Tegra need more
fixes.
What we generally have to do is:
[1] Move files arch/arm/cpu/$(CPU)/$(SOC)/* to arch/arm/mach-$(SOC)/*
[2] Add machine entry into arch/arm/Makefile
[3] Remove "obj-y += $(SOC)" from arch/arm/cpu/$(CPU)/Makefile
[4] Fix the Kconfig file path in arch/arm/Kconfig
[5] Modify MAINTAINERS if necessary
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2015-02-20 08:04:02 +00:00
|
|
|
# Machine directory name. This list is sorted alphanumerically
|
|
|
|
# by CONFIG_* macro name.
|
2017-01-18 21:44:55 +00:00
|
|
|
machine-$(CONFIG_ARCH_ASPEED) += aspeed
|
2015-02-20 08:04:03 +00:00
|
|
|
machine-$(CONFIG_ARCH_AT91) += at91
|
2015-03-19 10:42:56 +00:00
|
|
|
machine-$(CONFIG_ARCH_BCM283X) += bcm283x
|
2018-06-08 21:59:45 +00:00
|
|
|
machine-$(CONFIG_ARCH_BCMSTB) += bcmstb
|
2015-02-20 08:04:05 +00:00
|
|
|
machine-$(CONFIG_ARCH_DAVINCI) += davinci
|
2015-08-03 12:28:00 +00:00
|
|
|
machine-$(CONFIG_ARCH_EXYNOS) += exynos
|
2015-02-20 08:04:08 +00:00
|
|
|
machine-$(CONFIG_ARCH_HIGHBANK) += highbank
|
2020-07-06 08:37:54 +00:00
|
|
|
machine-$(CONFIG_ARCH_IPQ40XX) += ipq40xx
|
2018-08-27 10:27:08 +00:00
|
|
|
machine-$(CONFIG_ARCH_K3) += k3
|
2015-02-20 08:04:11 +00:00
|
|
|
machine-$(CONFIG_ARCH_KEYSTONE) += keystone
|
2020-05-06 12:02:40 +00:00
|
|
|
machine-$(CONFIG_ARCH_KIRKWOOD) += kirkwood
|
2020-05-06 12:02:36 +00:00
|
|
|
machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx
|
2018-11-15 02:07:52 +00:00
|
|
|
machine-$(CONFIG_ARCH_MEDIATEK) += mediatek
|
2016-05-08 06:30:16 +00:00
|
|
|
machine-$(CONFIG_ARCH_MESON) += meson
|
2015-12-21 12:56:33 +00:00
|
|
|
machine-$(CONFIG_ARCH_MVEBU) += mvebu
|
2020-07-10 17:07:26 +00:00
|
|
|
machine-$(CONFIG_ARCH_NEXELL) += nexell
|
2020-05-06 12:02:37 +00:00
|
|
|
machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2
|
2020-05-06 12:02:38 +00:00
|
|
|
machine-$(CONFIG_ARCH_ORION5X) += orion5x
|
2018-06-14 18:08:31 +00:00
|
|
|
machine-$(CONFIG_ARCH_OWL) += owl
|
2020-05-06 12:02:37 +00:00
|
|
|
machine-$(CONFIG_ARCH_RMOBILE) += rmobile
|
|
|
|
machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip
|
2015-11-20 06:24:57 +00:00
|
|
|
machine-$(CONFIG_ARCH_S5PC1XX) += s5pc1xx
|
2016-03-31 21:12:32 +00:00
|
|
|
machine-$(CONFIG_ARCH_SNAPDRAGON) += snapdragon
|
2015-04-21 11:38:21 +00:00
|
|
|
machine-$(CONFIG_ARCH_SOCFPGA) += socfpga
|
2020-05-06 12:02:42 +00:00
|
|
|
machine-$(CONFIG_ARCH_STM32) += stm32
|
2018-03-12 09:46:10 +00:00
|
|
|
machine-$(CONFIG_ARCH_STM32MP) += stm32mp
|
2020-05-06 12:02:37 +00:00
|
|
|
machine-$(CONFIG_ARCH_SUNXI) += sunxi
|
2020-05-06 12:02:41 +00:00
|
|
|
machine-$(CONFIG_ARCH_TEGRA) += tegra
|
2020-01-04 17:45:17 +00:00
|
|
|
machine-$(CONFIG_ARCH_U8500) += u8500
|
2019-10-20 01:37:55 +00:00
|
|
|
machine-$(CONFIG_ARCH_OCTEONTX) += octeontx
|
2019-10-20 01:47:37 +00:00
|
|
|
machine-$(CONFIG_ARCH_OCTEONTX2) += octeontx2
|
2015-02-26 17:26:42 +00:00
|
|
|
machine-$(CONFIG_ARCH_UNIPHIER) += uniphier
|
2020-05-06 12:02:37 +00:00
|
|
|
machine-$(CONFIG_ARCH_VERSAL) += versal
|
2015-03-16 07:43:24 +00:00
|
|
|
machine-$(CONFIG_ARCH_ZYNQ) += zynq
|
2019-01-17 07:22:43 +00:00
|
|
|
machine-$(CONFIG_ARCH_ZYNQMP) += zynqmp
|
2018-04-12 15:39:46 +00:00
|
|
|
machine-$(CONFIG_ARCH_ZYNQMP_R5) += zynqmp-r5
|
ARM: prepare for moving SoC sources into mach-*
In U-boot, the directory structure, arch/$(ARCH)/cpu/$(CPU)/$(SOC)/
has been adopted except that $(CPU) is missing from some
architectures and $(SOC) is missing from some CPUs.
This structure did not fit very well in some cases.
[1] AT91
AT91 SoC family have been developed across some ARM processor
generations. Generally speaking, some IPs are often re-used in the
same SoC family (same SoC vendor) even when the main processor is
updated. As a result, a SoC-common directory is needed in the upper
level. Currently, AT91 source files are placed as follows:
arch/arm/cpu/arm920t/at91/*
arch/arm/cpu/arm926ejs/at91/*
arch/arm/cpu/armv7/at91/*
arch/arm/cpu/at91-common/*
Once directories are split, the motivation for refactorings across
CPU directories is lost. Some files in arm920t/at91/ and
arm926ejs/at91/ are so similar that they could be merged.
[2] Tegra
Tegra is a little bit special case where different CPUs are used for
SPL and the main U-boot. To obey the arch/$(ARCH)/cpu/$(CPU)/$(SOC)
structure, the source files must be placed across the CPUs,
again SoC-common directory is necessary in the upper level.
Moreover, there are several families in Tegra: Tegra20, Tegra30,
Tegra114, Tegra124. Here again, the tegra-common directory is needed
to contain commonly-used files.
Tegra directories have been sprinkled in the directory structure.
arch/arm/cpu/arm720t/tegra20
arch/arm/cpu/arm720t/tegra30
arch/arm/cpu/arm720t/tegra114
arch/arm/cpu/arm720t/tegra124
arch/arm/cpu/arm720t/tegra-common
arch/arm/cpu/armv7/tegra20
arch/arm/cpu/armv7/tegra30
arch/arm/cpu/armv7/tegra114
arch/arm/cpu/armv7/tegra124
arch/arm/cpu/armv7/tegra-common
arch/arm/cpu/tegra20-common
arch/arm/cpu/tegra30-common
arch/arm/cpu/tegra114-common
arch/arm/cpu/tegra124-common
arch/arm/cpu/tegra-common
As you see, splitting SoC code by the CPU is not going well,
especially for ARM.
Why don't we collect SoC-specific files into a single place?
A good example we can follow is Linux's arch/arm/mach-* structure.
This item was discussed in the following thread:
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/188548/
Looks like I got some positive responses and we are almost ready to
start this movement.
This commit prepares arch/arm/Makefile for describing machdirs in it.
After this commit, we can move SoC directory to arch/arm/mach-$(SOC)
in simple steps although some cases such as AT91 and Tegra need more
fixes.
What we generally have to do is:
[1] Move files arch/arm/cpu/$(CPU)/$(SOC)/* to arch/arm/mach-$(SOC)/*
[2] Add machine entry into arch/arm/Makefile
[3] Remove "obj-y += $(SOC)" from arch/arm/cpu/$(CPU)/Makefile
[4] Fix the Kconfig file path in arch/arm/Kconfig
[5] Modify MAINTAINERS if necessary
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2015-02-20 08:04:02 +00:00
|
|
|
|
|
|
|
machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
|
|
|
|
|
2015-02-20 08:04:19 +00:00
|
|
|
PLATFORM_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
|
|
|
|
|
ARM: prepare for moving SoC sources into mach-*
In U-boot, the directory structure, arch/$(ARCH)/cpu/$(CPU)/$(SOC)/
has been adopted except that $(CPU) is missing from some
architectures and $(SOC) is missing from some CPUs.
This structure did not fit very well in some cases.
[1] AT91
AT91 SoC family have been developed across some ARM processor
generations. Generally speaking, some IPs are often re-used in the
same SoC family (same SoC vendor) even when the main processor is
updated. As a result, a SoC-common directory is needed in the upper
level. Currently, AT91 source files are placed as follows:
arch/arm/cpu/arm920t/at91/*
arch/arm/cpu/arm926ejs/at91/*
arch/arm/cpu/armv7/at91/*
arch/arm/cpu/at91-common/*
Once directories are split, the motivation for refactorings across
CPU directories is lost. Some files in arm920t/at91/ and
arm926ejs/at91/ are so similar that they could be merged.
[2] Tegra
Tegra is a little bit special case where different CPUs are used for
SPL and the main U-boot. To obey the arch/$(ARCH)/cpu/$(CPU)/$(SOC)
structure, the source files must be placed across the CPUs,
again SoC-common directory is necessary in the upper level.
Moreover, there are several families in Tegra: Tegra20, Tegra30,
Tegra114, Tegra124. Here again, the tegra-common directory is needed
to contain commonly-used files.
Tegra directories have been sprinkled in the directory structure.
arch/arm/cpu/arm720t/tegra20
arch/arm/cpu/arm720t/tegra30
arch/arm/cpu/arm720t/tegra114
arch/arm/cpu/arm720t/tegra124
arch/arm/cpu/arm720t/tegra-common
arch/arm/cpu/armv7/tegra20
arch/arm/cpu/armv7/tegra30
arch/arm/cpu/armv7/tegra114
arch/arm/cpu/armv7/tegra124
arch/arm/cpu/armv7/tegra-common
arch/arm/cpu/tegra20-common
arch/arm/cpu/tegra30-common
arch/arm/cpu/tegra114-common
arch/arm/cpu/tegra124-common
arch/arm/cpu/tegra-common
As you see, splitting SoC code by the CPU is not going well,
especially for ARM.
Why don't we collect SoC-specific files into a single place?
A good example we can follow is Linux's arch/arm/mach-* structure.
This item was discussed in the following thread:
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/188548/
Looks like I got some positive responses and we are almost ready to
start this movement.
This commit prepares arch/arm/Makefile for describing machdirs in it.
After this commit, we can move SoC directory to arch/arm/mach-$(SOC)
in simple steps although some cases such as AT91 and Tegra need more
fixes.
What we generally have to do is:
[1] Move files arch/arm/cpu/$(CPU)/$(SOC)/* to arch/arm/mach-$(SOC)/*
[2] Add machine entry into arch/arm/Makefile
[3] Remove "obj-y += $(SOC)" from arch/arm/cpu/$(CPU)/Makefile
[4] Fix the Kconfig file path in arch/arm/Kconfig
[5] Modify MAINTAINERS if necessary
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2015-02-20 08:04:02 +00:00
|
|
|
libs-y += $(machdirs)
|
|
|
|
|
2014-11-21 22:51:33 +00:00
|
|
|
head-y := arch/arm/cpu/$(CPU)/start.o
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_SPL_BUILD),y)
|
|
|
|
ifneq ($(CONFIG_SPL_START_S_PATH),)
|
|
|
|
head-y := $(CONFIG_SPL_START_S_PATH:"%"=%)/start.o
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
libs-y += arch/arm/cpu/$(CPU)/
|
|
|
|
libs-y += arch/arm/cpu/
|
|
|
|
libs-y += arch/arm/lib/
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_SPL_BUILD),y)
|
2021-08-07 08:00:35 +00:00
|
|
|
ifneq (,$(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_MX35)$(filter $(SOC), mx25 mx5 mx6 mx7 mx35 imx8m imx8 imx8ulp imxrt))
|
2017-06-29 08:16:06 +00:00
|
|
|
libs-y += arch/arm/mach-imx/
|
2014-11-21 22:51:33 +00:00
|
|
|
endif
|
|
|
|
else
|
2021-08-07 08:00:35 +00:00
|
|
|
ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx7 mx7ulp mx31 mx35 mxs imx8m imx8 imx8ulp imxrt vf610))
|
2017-06-29 08:16:06 +00:00
|
|
|
libs-y += arch/arm/mach-imx/
|
2014-11-21 22:51:33 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2015-04-25 04:29:46 +00:00
|
|
|
ifneq (,$(filter $(SOC), kirkwood))
|
|
|
|
libs-y += arch/arm/mach-mvebu/
|
2014-11-21 22:51:33 +00:00
|
|
|
endif
|
ARM: prepare for moving SoC sources into mach-*
In U-boot, the directory structure, arch/$(ARCH)/cpu/$(CPU)/$(SOC)/
has been adopted except that $(CPU) is missing from some
architectures and $(SOC) is missing from some CPUs.
This structure did not fit very well in some cases.
[1] AT91
AT91 SoC family have been developed across some ARM processor
generations. Generally speaking, some IPs are often re-used in the
same SoC family (same SoC vendor) even when the main processor is
updated. As a result, a SoC-common directory is needed in the upper
level. Currently, AT91 source files are placed as follows:
arch/arm/cpu/arm920t/at91/*
arch/arm/cpu/arm926ejs/at91/*
arch/arm/cpu/armv7/at91/*
arch/arm/cpu/at91-common/*
Once directories are split, the motivation for refactorings across
CPU directories is lost. Some files in arm920t/at91/ and
arm926ejs/at91/ are so similar that they could be merged.
[2] Tegra
Tegra is a little bit special case where different CPUs are used for
SPL and the main U-boot. To obey the arch/$(ARCH)/cpu/$(CPU)/$(SOC)
structure, the source files must be placed across the CPUs,
again SoC-common directory is necessary in the upper level.
Moreover, there are several families in Tegra: Tegra20, Tegra30,
Tegra114, Tegra124. Here again, the tegra-common directory is needed
to contain commonly-used files.
Tegra directories have been sprinkled in the directory structure.
arch/arm/cpu/arm720t/tegra20
arch/arm/cpu/arm720t/tegra30
arch/arm/cpu/arm720t/tegra114
arch/arm/cpu/arm720t/tegra124
arch/arm/cpu/arm720t/tegra-common
arch/arm/cpu/armv7/tegra20
arch/arm/cpu/armv7/tegra30
arch/arm/cpu/armv7/tegra114
arch/arm/cpu/armv7/tegra124
arch/arm/cpu/armv7/tegra-common
arch/arm/cpu/tegra20-common
arch/arm/cpu/tegra30-common
arch/arm/cpu/tegra114-common
arch/arm/cpu/tegra124-common
arch/arm/cpu/tegra-common
As you see, splitting SoC code by the CPU is not going well,
especially for ARM.
Why don't we collect SoC-specific files into a single place?
A good example we can follow is Linux's arch/arm/mach-* structure.
This item was discussed in the following thread:
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/188548/
Looks like I got some positive responses and we are almost ready to
start this movement.
This commit prepares arch/arm/Makefile for describing machdirs in it.
After this commit, we can move SoC directory to arch/arm/mach-$(SOC)
in simple steps although some cases such as AT91 and Tegra need more
fixes.
What we generally have to do is:
[1] Move files arch/arm/cpu/$(CPU)/$(SOC)/* to arch/arm/mach-$(SOC)/*
[2] Add machine entry into arch/arm/Makefile
[3] Remove "obj-y += $(SOC)" from arch/arm/cpu/$(CPU)/Makefile
[4] Fix the Kconfig file path in arch/arm/Kconfig
[5] Modify MAINTAINERS if necessary
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2015-02-20 08:04:02 +00:00
|
|
|
|
|
|
|
# deprecated
|
|
|
|
-include $(machdirs)/config.mk
|