Skip to contentSkip to conversation

mpx85xx/fdt: Add cpu-release-addr for all cores

PATCH Superseded Matthew McClintock 2 participants 4 messages Aug 18, 2010 – Aug 20, 2010 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mpx85xx/fdt: Add cpu-release-addr for all cores

We currently do not add a cpu-release-addr for core 0, this is needed when we want to reset core 0 and later restart it from Linux

---
 arch/powerpc/cpu/mpc85xx/fdt.c |   21 ++++++++-------------
 1 files changed, 8 insertions(+), 13 deletions(-)
arch/powerpc/cpu/mpc85xx/fdt.c +8 -13
index 8e7b827..acc70bf 100644
@@ -47,25 +47,20 @@ void ft_fixup_cpu(void *blob, u64 memory_limit)
 	int off;
 	ulong spin_tbl_addr = get_spin_phys_addr();
 	u32 bootpg = determine_mp_bootpg();
-	u32 id = get_my_id();
 
 	off = fdt_node_offset_by_prop_value(blob, -1, "device_type", "cpu", 4);
 	while (off != -FDT_ERR_NOTFOUND) {
 		u32 *reg = (u32 *)fdt_getprop(blob, off, "reg", 0);
 
 		if (reg) {
-			if (*reg == id) {
-				fdt_setprop_string(blob, off, "status", "okay");
-			} else {
-				u64 val = *reg * SIZE_BOOT_ENTRY + spin_tbl_addr;
-				val = cpu_to_fdt32(val);
-				fdt_setprop_string(blob, off, "status",
-								"disabled");
-				fdt_setprop_string(blob, off, "enable-method",
-								"spin-table");
-				fdt_setprop(blob, off, "cpu-release-addr",
-						&val, sizeof(val));
-			}
+			u64 val = *reg * SIZE_BOOT_ENTRY + spin_tbl_addr;
+			val = cpu_to_fdt32(val);
+			fdt_setprop_string(blob, off, "status",
+							"disabled");
+			fdt_setprop_string(blob, off, "enable-method",
+							"spin-table");
+			fdt_setprop(blob, off, "cpu-release-addr",
+					&val, sizeof(val));
 		} else {
 			printf ("cpu NULL\n");
 		}
Signature · 1 line
1.6.6.1
#1 lore raw

PATCH 1/1 mpx85xx/fdt: Add cpu-release-addr for all cores

Quoted 13 lines · Matthew McClintock

We currently do not add a cpu-release-addr for core 0, this is needed when we want to reset core 0 and later restart it from Linux
---
arch/powerpc/cpu/mpc85xx/fdt.c | 21 ++++++++-------------

1 files changed, 8 insertions(+), 13 deletions(-)
arch/powerpc/cpu/mpc85xx/fdt.c +0 -0
index 8e7b827..acc70bf 100644
@@ -47,25 +47,20 @@ void ft_fixup_cpu(void *blob, u64 memory_limit)
 	int off;
 	ulong spin_tbl_addr = get_spin_phys_addr();

arch/powerpc/cpu/mpc85xx/fdt.c void ft_fixup_cpu(void *blob, u64 memory_limit) · line 58

Quoted 10 lines
arch/powerpc/cpu/mpc85xx/fdt.c +0 -3
 	u32 bootpg = determine_mp_bootpg();
-	u32 id = get_my_id();
 
 	off = fdt_node_offset_by_prop_value(blob, -1, "device_type", "cpu", 4);
 	while (off != -FDT_ERR_NOTFOUND) {
 		u32 *reg = (u32 *)fdt_getprop(blob, off, "reg", 0);
 
 		if (reg) {
-			if (*reg == id) {
-				fdt_setprop_string(blob, off, "status", "okay");

Don't we still want "status" = "okay" for boot cpu?

Quoted 29 lines
arch/powerpc/cpu/mpc85xx/fdt.c +8 -10
-			} else {
-				u64 val = *reg * SIZE_BOOT_ENTRY + spin_tbl_addr;
-				val = cpu_to_fdt32(val);
-				fdt_setprop_string(blob, off, "status",
-								"disabled");
-				fdt_setprop_string(blob, off, "enable-method",
-								"spin-table");
-				fdt_setprop(blob, off, "cpu-release-addr",
-						&val, sizeof(val));
-			}
+			u64 val = *reg * SIZE_BOOT_ENTRY + spin_tbl_addr;
+			val = cpu_to_fdt32(val);
+			fdt_setprop_string(blob, off, "status",
+							"disabled");
+			fdt_setprop_string(blob, off, "enable-method",
+							"spin-table");
+			fdt_setprop(blob, off, "cpu-release-addr",
+					&val, sizeof(val));
 		} else {
 			printf ("cpu NULL\n");
 		}
Signature · 7 lines
1.6.6.1


_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
#2 lore raw

PATCH v2 1/1 mpx85xx/fdt: Add cpu-release-addr for all cores

We currently do not add a cpu-release-addr for core 0, this is needed when we want to reset core 0 and later restart it from Linux

---
v2: Mark boot cpu status as "okay"

 arch/powerpc/cpu/mpc85xx/fdt.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
arch/powerpc/cpu/mpc85xx/fdt.c +8 -7
index 8e7b827..4540364 100644
@@ -54,18 +54,19 @@ void ft_fixup_cpu(void *blob, u64 memory_limit)
 		u32 *reg = (u32 *)fdt_getprop(blob, off, "reg", 0);
 
 		if (reg) {
+			u64 val = *reg * SIZE_BOOT_ENTRY + spin_tbl_addr;
+			val = cpu_to_fdt32(val);
 			if (*reg == id) {
-				fdt_setprop_string(blob, off, "status", "okay");
+				fdt_setprop_string(blob, off, "status",
+								"okay");
 			} else {
-				u64 val = *reg * SIZE_BOOT_ENTRY + spin_tbl_addr;
-				val = cpu_to_fdt32(val);
 				fdt_setprop_string(blob, off, "status",
 								"disabled");
-				fdt_setprop_string(blob, off, "enable-method",
-								"spin-table");
-				fdt_setprop(blob, off, "cpu-release-addr",
-						&val, sizeof(val));
 			}
+			fdt_setprop_string(blob, off, "enable-method",
+							"spin-table");
+			fdt_setprop(blob, off, "cpu-release-addr",
+					&val, sizeof(val));
 		} else {
 			printf ("cpu NULL\n");
 		}
Signature · 1 line
1.6.6.1
Applied
#3 lore raw

PATCH v2 1/1 mpx85xx/fdt: Add cpu-release-addr for all cores

Quoted 9 lines · Matthew McClintock

We currently do not add a cpu-release-addr for core 0, this is needed when we want to reset core 0 and later restart it from Linux

---
v2: Mark boot cpu status as "okay"

arch/powerpc/cpu/mpc85xx/fdt.c | 15 ++++++++-------

1 files changed, 8 insertions(+), 7 deletions(-)

applied to 85xx

- k