Merge "feat(tc): introduce TC2 platform" into integration
diff --git a/docs/plat/arm/tc/index.rst b/docs/plat/arm/tc/index.rst
index 20d3e56..ae2b836 100644
--- a/docs/plat/arm/tc/index.rst
+++ b/docs/plat/arm/tc/index.rst
@@ -13,11 +13,14 @@
 - SCMI
 - MHUv2
 
-Currently, the main difference between TC0 (TARGET_PLATFORM=0) and TC1
-(TARGET_PLATFORM=1) platforms w.r.t to TF-A is the CPUs supported. TC0 has
-support for Cortex A510, Cortex A710 and Cortex X2, while TC1 has support for
-Cortex A510, Cortex Makalu and Cortex Makalu ELP Arm CPUs.
+Currently, the main difference between TC0 (TARGET_PLATFORM=0), TC1
+(TARGET_PLATFORM=1), TC2 (TARGET_PLATFORM=2) platforms w.r.t to TF-A
+is the CPUs supported as below:
 
+-  TC0 has support for Cortex A510, Cortex A710 and Cortex X2.
+-  TC1 has support for Cortex A510, Cortex Makalu and Cortex Makalu ELP.
+-  TC2 has support for Hayes and Hunter Arm CPUs.
+
 
 Boot Sequence
 -------------
@@ -33,15 +36,15 @@
 Build Procedure (TF-A only)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
--  Obtain arm `toolchain <https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads>`_.
-   Set the CROSS_COMPILE environment variable to point to the toolchain folder.
+-  Obtain `Arm toolchain`_ and set the CROSS_COMPILE environment variable to
+   point to the toolchain folder.
 
 -  Build TF-A:
 
    .. code:: shell
 
       make PLAT=tc BL33=<path_to_uboot.bin> \
-      SCP_BL2=<path_to_scp_ramfw.bin> TARGET_PLATFORM={0,1} all fip
+      SCP_BL2=<path_to_scp_ramfw.bin> TARGET_PLATFORM={0,1,2} all fip
 
    Enable TBBR by adding the following options to the make command:
 
@@ -53,4 +56,8 @@
       ARM_ROTPK_LOCATION=devel_rsa  \
       ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem
 
+--------------
+
+*Copyright (c) 2020-2022, Arm Limited. All rights reserved.*
+
-*Copyright (c) 2020-2021, Arm Limited. All rights reserved.*
+.. _Arm Toolchain: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads
diff --git a/plat/arm/board/tc/platform.mk b/plat/arm/board/tc/platform.mk
index 18fcd54..e6c1c7c 100644
--- a/plat/arm/board/tc/platform.mk
+++ b/plat/arm/board/tc/platform.mk
@@ -5,8 +5,8 @@
 
 include common/fdt_wrappers.mk
 
-ifeq ($(filter ${TARGET_PLATFORM}, 0 1),)
-        $(error TARGET_PLATFORM must be 0 or 1)
+ifeq ($(shell expr $(TARGET_PLATFORM) \<= 2), 0)
+        $(error TARGET_PLATFORM must be less than or equal to 2)
 endif
 
 $(eval $(call add_define,TARGET_PLATFORM))
@@ -63,21 +63,26 @@
 
 PLAT_INCLUDES		+=	-I${TC_BASE}/include/
 
-# Common CPU libraries
-TC_CPU_SOURCES	:=	lib/cpus/aarch64/cortex_a510.S
-
 # CPU libraries for TARGET_PLATFORM=0
 ifeq (${TARGET_PLATFORM}, 0)
-TC_CPU_SOURCES	+=	lib/cpus/aarch64/cortex_a710.S \
+TC_CPU_SOURCES	+=	lib/cpus/aarch64/cortex_a510.S	\
+			lib/cpus/aarch64/cortex_a710.S	\
 			lib/cpus/aarch64/cortex_x2.S
 endif
 
 # CPU libraries for TARGET_PLATFORM=1
 ifeq (${TARGET_PLATFORM}, 1)
-TC_CPU_SOURCES	+=	lib/cpus/aarch64/cortex_makalu.S \
+TC_CPU_SOURCES	+=	lib/cpus/aarch64/cortex_a510.S \
+			lib/cpus/aarch64/cortex_makalu.S \
 			lib/cpus/aarch64/cortex_makalu_elp_arm.S
 endif
 
+# CPU libraries for TARGET_PLATFORM=2
+ifeq (${TARGET_PLATFORM}, 2)
+TC_CPU_SOURCES	+=	lib/cpus/aarch64/cortex_hayes.S \
+			lib/cpus/aarch64/cortex_hunter.S
+endif
+
 INTERCONNECT_SOURCES	:=	${TC_BASE}/tc_interconnect.c
 
 PLAT_BL_COMMON_SOURCES	+=	${TC_BASE}/tc_plat.c	\