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
|
|
|
|
arch-$(CONFIG_CPU_ARM920T) =-march=armv4
|
|
|
|
arch-$(CONFIG_CPU_ARM926EJS) =-march=armv5te
|
|
|
|
arch-$(CONFIG_CPU_ARM946ES) =-march=armv4
|
|
|
|
arch-$(CONFIG_CPU_SA1100) =-march=armv4
|
|
|
|
arch-$(CONFIG_CPU_PXA) =
|
|
|
|
arch-$(CONFIG_CPU_ARM1136) =-march=armv5
|
|
|
|
arch-$(CONFIG_CPU_ARM1176) =-march=armv5t
|
|
|
|
arch-$(CONFIG_CPU_V7) =$(call cc-option, -march=armv7-a, -march=armv5)
|
|
|
|
arch-$(CONFIG_ARM64) =-march=armv8-a
|
|
|
|
|
|
|
|
# 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-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
|
2015-04-25 04:29:44 +00:00
|
|
|
machine-$(CONFIG_ARMADA_XP) += mvebu
|
2015-02-20 08:04:04 +00:00
|
|
|
# TODO: rename CONFIG_TEGRA -> CONFIG_ARCH_TEGRA
|
2015-02-20 08:04:07 +00:00
|
|
|
machine-$(CONFIG_ARCH_NOMADIK) += nomadik
|
2015-02-20 08:04:09 +00:00
|
|
|
# TODO: rename CONFIG_ORION5X -> CONFIG_ARCH_ORION5X
|
|
|
|
machine-$(CONFIG_ORION5X) += orion5x
|
2015-04-21 11:38:21 +00:00
|
|
|
machine-$(CONFIG_ARCH_SOCFPGA) += socfpga
|
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-02-20 08:04:10 +00:00
|
|
|
machine-$(CONFIG_ARCH_VERSATILE) += versatile
|
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-06-29 07:10:46 +00:00
|
|
|
ifneq (,$(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_MX35)$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35))
|
2014-11-21 22:51:33 +00:00
|
|
|
libs-y += arch/arm/imx-common/
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35 mxs vf610))
|
|
|
|
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
|