2014-11-21 22:51:33 +00:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
|
|
|
#
|
|
|
|
|
2015-04-11 15:58:14 +00:00
|
|
|
ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TEGRA),yy)
|
|
|
|
CONFIG_CPU_V7=
|
|
|
|
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) =
|
|
|
|
arch-$(CONFIG_CPU_ARM1136) =-march=armv5
|
|
|
|
arch-$(CONFIG_CPU_ARM1176) =-march=armv5t
|
2016-03-16 23:55:55 +00:00
|
|
|
arch-$(CONFIG_CPU_V7) =$(call cc-option, -march=armv7-a, \
|
|
|
|
$(call cc-option, -march=armv7, -march=armv5))
|
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
|
|
|
|
ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TEGRA),yy)
|
|
|
|
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) =
|
|
|
|
tune-$(CONFIG_CPU_V7) =
|
|
|
|
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.
|
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
|
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
|
2015-02-20 08:04:11 +00:00
|
|
|
machine-$(CONFIG_ARCH_KEYSTONE) += keystone
|
2015-02-20 08:04:06 +00:00
|
|
|
# TODO: rename CONFIG_KIRKWOOD -> CONFIG_ARCH_KIRKWOOD
|
|
|
|
machine-$(CONFIG_KIRKWOOD) += kirkwood
|
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
|
2015-02-20 08:04:04 +00:00
|
|
|
# TODO: rename CONFIG_TEGRA -> CONFIG_ARCH_TEGRA
|
2015-02-20 08:04:09 +00:00
|
|
|
# TODO: rename CONFIG_ORION5X -> CONFIG_ARCH_ORION5X
|
|
|
|
machine-$(CONFIG_ORION5X) += orion5x
|
2015-11-20 06:24:57 +00:00
|
|
|
machine-$(CONFIG_ARCH_S5PC1XX) += s5pc1xx
|
2016-03-29 15:29:06 +00:00
|
|
|
machine-$(CONFIG_ARCH_SUNXI) += sunxi
|
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
|
2015-08-30 22:55:38 +00:00
|
|
|
machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip
|
2016-01-16 01:49:06 +00:00
|
|
|
machine-$(CONFIG_STM32) += stm32
|
2015-02-20 08:04:04 +00:00
|
|
|
machine-$(CONFIG_TEGRA) += tegra
|
2015-02-26 17:26:42 +00:00
|
|
|
machine-$(CONFIG_ARCH_UNIPHIER) += uniphier
|
2015-03-16 07:43:24 +00:00
|
|
|
machine-$(CONFIG_ARCH_ZYNQ) += zynq
|
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)
|
2015-09-02 18:54:23 +00:00
|
|
|
ifneq (,$(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_MX35)$(filter $(SOC), mx25 mx27 mx5 mx6 mx7 mx31 mx35))
|
2014-11-21 22:51:33 +00:00
|
|
|
libs-y += arch/arm/imx-common/
|
|
|
|
endif
|
|
|
|
else
|
2015-09-02 18:54:23 +00:00
|
|
|
ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx7 mx31 mx35 mxs vf610))
|
2014-11-21 22:51:33 +00:00
|
|
|
libs-y += arch/arm/imx-common/
|
|
|
|
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
|