From 1c1953653c20b4a8c61a7deb3fc493d496d8c478 Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Thu, 27 May 2021 16:01:57 +0100
Subject: [PATCH 1/3] fix(tc0): change UUID to string format

Change OP-TEE, Cactus SPs UUID to string format

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I32dbf40e4c5aa959bb92d3e853072aea63409ddc
---
 plat/arm/board/tc0/fdts/tc0_tb_fw_config.dts | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/plat/arm/board/tc0/fdts/tc0_tb_fw_config.dts b/plat/arm/board/tc0/fdts/tc0_tb_fw_config.dts
index 38fd0e006..28ed7ae94 100644
--- a/plat/arm/board/tc0/fdts/tc0_tb_fw_config.dts
+++ b/plat/arm/board/tc0/fdts/tc0_tb_fw_config.dts
@@ -39,24 +39,24 @@
 #endif
 #if OPTEE_SP_FW_CONFIG
 		op-tee {
-		       uuid = <0x486178e0 0xe7f811e3 0xbc5e0002 0xa5d5c51b>;
+		       uuid = "486178e0-e7f8-11e3-bc5e-0002a5d5c51b";
 		       load-address = <0xfd280000>;
 		};
 #else
 		cactus-primary {
-			uuid = <0xb4b5671e 0x4a904fe1 0xb81ffb13 0xdae1dacb>;
+			uuid = "b4b5671e-4a90-4fe1-b81f-fb13dae1dacb";
 			load-address = <0xfe000000>;
 			owner = "SiP";
 		};
 
 		cactus-secondary {
-			uuid = <0xd1582309 0xf02347b9 0x827c4464 0xf5578fc8>;
+			uuid = "d1582309-f023-47b9-827c-4464f5578fc8";
 			load-address = <0xfe100000>;
 			owner = "Plat";
 		};
 
 		cactus-tertiary {
-			uuid = <0x79b55c73 0x1d8c44b9 0x859361e1 0x770ad8d2>;
+			uuid = "79b55c73-1d8c-44b9-8593-61e1770ad8d2";
 			load-address = <0xfe200000>;
 		};
 #endif

From 05f667f0c670ba9682050714561309f00210c282 Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Thu, 27 May 2021 16:03:58 +0100
Subject: [PATCH 2/3] fix(tc0): set cactus-tertiary vcpu count to 1

Third instance of cactus is a UP SP. Set its vcpu count to 1.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I34b7feb2915e6d335e690e89dea466e75944ed1b
---
 plat/arm/board/tc0/fdts/tc0_spmc_manifest.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plat/arm/board/tc0/fdts/tc0_spmc_manifest.dts b/plat/arm/board/tc0/fdts/tc0_spmc_manifest.dts
index 2f459b013..44c7008a8 100644
--- a/plat/arm/board/tc0/fdts/tc0_spmc_manifest.dts
+++ b/plat/arm/board/tc0/fdts/tc0_spmc_manifest.dts
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2020-2021, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -40,7 +40,7 @@
 			is_ffa_partition;
 			debug_name = "cactus-tertiary";
 			load_address = <0xfe200000>;
-			vcpu_count = <8>;
+			vcpu_count = <1>;
 			mem_size = <1048576>;
 		};
 	};

From f1b44a9050fbc12e8c260107bfff2930476df062 Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Thu, 27 May 2021 16:05:12 +0100
Subject: [PATCH 3/3] fix(tc0): remove ffa and optee device tree node

As FF-A driver probes OP-TEE SP dynamically, these entries are no more
required.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Ica091722a7fad13e02662b9b2cd11ca1879b9f80
---
 fdts/tc0.dts | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/fdts/tc0.dts b/fdts/tc0.dts
index a4f7a4dec..a1ecf8f65 100644
--- a/fdts/tc0.dts
+++ b/fdts/tc0.dts
@@ -430,16 +430,4 @@
 		};
 	};
 
-	ffa {
-		compatible = "arm,ffa";
-		conduit = "smc";
-		mem_share_buffer = "tx";
-	};
-
-	firmware {
-		optee {
-		      compatible = "linaro,optee-tz";
-		      method = "ffa";
-		};
-	};
 };