Skip to contentSkip to conversation

ppc/85x/86xxx: Device tree fixup for number of cores

PATCH New Poonam Aggrwal 2 participants 2 messages Sep 2, 2009 – Sep 5, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc/85x/86xxx: Device tree fixup for number of cores

Fixing the number of cores in the device tree based on the actual number of cores on the system.
With this same device tree image can be used for dual core and single core members of otherwise exactly same SOC.
For example P2020RDB and P2010RDB

		P1020RDB and P1011RDB	

---
applies on git.am.freescale.net/mirrors/u-boot.git

 cpu/mpc85xx/fdt.c    |    2 +
 cpu/mpc86xx/fdt.c    |    3 ++
 cpu/mpc8xxx/Makefile |    1 +
 cpu/mpc8xxx/fdt.c    |   55 ++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 61 insertions(+), 0 deletions(-)
 create mode 100644 cpu/mpc8xxx/fdt.c
cpu/mpc85xx/fdt.c +2 -0
index a692529..4eef170 100644
@@ -31,6 +31,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 extern void ft_qe_setup(void *blob);
+extern void ft_fixup_num_cores(void *blob);
 
 #ifdef CONFIG_MP
 #include "mp.h"
@@ -324,6 +325,7 @@ void ft_cpu_setup(void *blob, bd_t *bd)
 #ifdef CONFIG_MP
 	ft_fixup_cpu(blob, (u64)bd->bi_memstart + (u64)bd->bi_memsize);
 #endif
+	ft_fixup_num_cores(blob);
 
 	ft_fixup_cache(blob);
 }
cpu/mpc86xx/fdt.c +3 -0
index a36ee30..51f3f4c 100644
@@ -13,6 +13,8 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+extern void ft_fixup_num_cores(void *blob);
+
 void ft_cpu_setup(void *blob, bd_t *bd)
 {
 #ifdef CONFIG_MP
@@ -54,4 +56,5 @@ void ft_cpu_setup(void *blob, bd_t *bd)
 	if (off < 0)
 		printf("%s: %s\n", __FUNCTION__, fdt_strerror(off));
 #endif
+	ft_fixup_num_cores(blob);
 }
cpu/mpc8xxx/Makefile +1 -0
index 430a75f..9817d1b 100644
@@ -11,6 +11,7 @@ include $(TOPDIR)/config.mk
 LIB	= $(obj)lib8xxx.a
 
 COBJS-y	+= cpu.o
+COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
 
 SRCS	:= $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
 OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
cpu/mpc8xxx/fdt.c new file +55 -0

55 lines not on this page · raw message

Signature · 1 line
1.5.6.5
Applied
#1 lore raw

PATCH 1/1 ppc/85x/86xxx: Device tree fixup for number of cores

Quoted 13 lines · Poonam Aggrwal

Fixing the number of cores in the device tree based on the actual number of
cores on the system.
With this same device tree image can be used for dual core and single core
members of otherwise exactly same SOC.
For example P2020RDB and P2010RDB

		P1020RDB and P1011RDB	

---
applies on git.am.freescale.net/mirrors/u-boot.git

Quoted 7 lines
cpu/mpc85xx/fdt.c    |    2 +
cpu/mpc86xx/fdt.c    |    3 ++
cpu/mpc8xxx/Makefile |    1 +
cpu/mpc8xxx/fdt.c    |   55 +++++++++++++++++++++++++++++++++++++++++ 
+++++++++
4 files changed, 61 insertions(+), 0 deletions(-)

create mode 100644 cpu/mpc8xxx/fdt.c

applied to 85xx

- K