summaryrefslogtreecommitdiffstats
path: root/meta-agl-refhw-gen3/recipes-bsp/arm-trusted-firmware/files/0001-rcar_gen3-plat-Delete-FDT-function-calls.patch
blob: 067bbb2f88c17343b15db0e00b947bc460ecf69e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
From a8e6139af9a307cc30d2e804819da963e419f017 Mon Sep 17 00:00:00 2001
From: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Date: Tue, 15 Dec 2020 18:23:32 +0900
Subject: [PATCH] rcar_gen3: plat: Delete FDT function calls

Since U-boot configures the device tree, the FDT function call by
BL31 is removed.

Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
---
 plat/renesas/rcar/bl2_plat_setup.c | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/plat/renesas/rcar/bl2_plat_setup.c b/plat/renesas/rcar/bl2_plat_setup.c
index 24a13c7f7..59a72b5bb 100644
--- a/plat/renesas/rcar/bl2_plat_setup.c
+++ b/plat/renesas/rcar/bl2_plat_setup.c
@@ -110,6 +110,7 @@ static meminfo_t bl2_tzram_layout __aligned(CACHE_WRITEBACK_GRANULE);
 
 /* FDT with DRAM configuration */
 uint64_t fdt_blob[PAGE_SIZE_4KB / sizeof(uint64_t)];
+#if 0
 static void *fdt = (void *)fdt_blob;
 
 static void unsigned_num_print(unsigned long long int unum, unsigned int radix,
@@ -133,7 +134,7 @@ static void unsigned_num_print(unsigned long long int unum, unsigned int radix,
 	while (--i >= 0)
 		*string++ = num_buf[i];
 }
-
+#endif
 #if (RCAR_LOSSY_ENABLE == 1)
 typedef struct bl2_lossy_info {
 	uint32_t magic;
@@ -145,6 +146,7 @@ static void bl2_lossy_gen_fdt(uint32_t no, uint64_t start_addr,
 			      uint64_t end_addr, uint32_t format,
 			      uint32_t enable, int fcnlnode)
 {
+#if 0
 	const uint64_t fcnlsize = cpu_to_fdt64(end_addr - start_addr);
 	char nodename[40] = { 0 };
 	int ret, node;
@@ -199,6 +201,7 @@ static void bl2_lossy_gen_fdt(uint32_t no, uint64_t start_addr,
 		NOTICE("BL2: Cannot add FCNL formats prop (ret=%i)\n", ret);
 		panic();
 	}
+#endif
 }
 
 static void bl2_lossy_setting(uint32_t no, uint64_t start_addr,
@@ -449,6 +452,7 @@ struct meminfo *bl2_plat_sec_mem_layout(void)
 	return &bl2_tzram_layout;
 }
 
+#if 0
 static void bl2_populate_compatible_string(void *dt)
 {
 	uint32_t board_type;
@@ -537,13 +541,17 @@ static void bl2_populate_compatible_string(void *dt)
 		panic();
 	}
 }
+#endif
 
 static void bl2_advertise_dram_entries(uint64_t dram_config[8])
 {
+#if 0
 	char nodename[32] = { 0 };
-	uint64_t start, size;
 	uint64_t fdtsize;
-	int ret, node, chan;
+	int ret, node;
+#endif
+	uint64_t start, size;
+	int chan;
 
 	for (chan = 0; chan < 4; chan++) {
 		start = dram_config[2 * chan];
@@ -556,7 +564,7 @@ static void bl2_advertise_dram_entries(uint64_t dram_config[8])
 			(size >> 30) ? : size >> 20,
 			(size >> 30) ? "G" : "M");
 	}
-
+#if 0
 	/*
 	 * We add the DT nodes in reverse order here. The fdt_add_subnode()
 	 * adds the DT node before the first existing DT node, so we have
@@ -604,6 +612,7 @@ static void bl2_advertise_dram_entries(uint64_t dram_config[8])
 err:
 	NOTICE("BL2: Cannot add memory node to FDT (ret=%i)\n", ret);
 	panic();
+#endif
 }
 
 static void bl2_advertise_dram_size(uint32_t product)
@@ -927,7 +936,7 @@ lcm_state:
 		}
 		rcar_qos_init();
 	}
-
+#if 0
 	/* Set up FDT */
 	ret = fdt_create_empty_tree(fdt, sizeof(fdt_blob));
 	if (ret) {
@@ -937,7 +946,7 @@ lcm_state:
 
 	/* Add platform compatible string */
 	bl2_populate_compatible_string(fdt);
-
+#endif
 	/* Print DRAM layout */
 	bl2_advertise_dram_size(product);
 
@@ -989,14 +998,14 @@ lcm_state:
 	}
 #if (RCAR_LOSSY_ENABLE == 1)
 	NOTICE("BL2: Lossy Decomp areas\n");
-
+#if 0
 	fcnlnode = fdt_add_subnode(fdt, 0, "reserved-memory");
 	if (fcnlnode < 0) {
 		NOTICE("BL2: Cannot create reserved mem node (ret=%i)\n",
 			fcnlnode);
 		panic();
 	}
-
+#endif
 	bl2_lossy_setting(0, LOSSY_ST_ADDR0, LOSSY_END_ADDR0,
 			  LOSSY_FMT0, LOSSY_ENA_DIS0, fcnlnode);
 	bl2_lossy_setting(1, LOSSY_ST_ADDR1, LOSSY_END_ADDR1,
@@ -1005,8 +1014,10 @@ lcm_state:
 			  LOSSY_FMT2, LOSSY_ENA_DIS2, fcnlnode);
 #endif
 
+#if 0
 	fdt_pack(fdt);
 	NOTICE("BL2: FDT at %p\n", fdt);
+#endif
 
 	if (boot_dev == MODEMR_BOOT_DEV_EMMC_25X1 ||
 	    boot_dev == MODEMR_BOOT_DEV_EMMC_50X8)
-- 
2.30.2