Skip to contentSkip to conversation

qe: fixup the snum for MPC8569 Rev2.0

PATCH New Liu Yu 2 participants 2 messages Jan 15, 2010 – Jan 26, 2010

lore
Share & tools
lore

Liu Yu

author
#0 lore raw

PATCH v3 1/1 qe: fixup the snum for MPC8569 Rev2.0

Since 1.0 and 2.0 use different snum table,
we fixup the snum value according to SPRN_SVR.

---
v3:
move code from board to cpu

 cpu/mpc85xx/fdt.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
cpu/mpc85xx/fdt.c +18 -0
index af0e78e..1d11ab4 100644
@@ -331,6 +331,23 @@ static void ft_fixup_dpaa_clks(void *blob)
 #define ft_fixup_dpaa_clks(x)
 #endif
 
+#ifdef CONFIG_QE
+static void ft_fixup_qe_snum(void *blob)
+{
+	unsigned int svr;
+
+	svr = mfspr(SPRN_SVR);
+	if (SVR_SOC_VER(svr) == SVR_8569_E) {
+		if(IS_SVR_REV(svr, 1, 0))
+			do_fixup_by_compat_u32(blob, "fsl,qe",
+				"fsl,qe-num-snums", 46, 1);
+		else
+			do_fixup_by_compat_u32(blob, "fsl,qe",
+				"fsl,qe-num-snums", 76, 1);
+	}
+}
+#endif
+
 void ft_cpu_setup(void *blob, bd_t *bd)
 {
 	int off;
@@ -367,6 +384,7 @@ void ft_cpu_setup(void *blob, bd_t *bd)
 		"bus-frequency", gd->lbc_clk, 1);
 #ifdef CONFIG_QE
 	ft_qe_setup(blob);
+	ft_fixup_qe_snum(blob);
 #endif
 
 #ifdef CONFIG_SYS_NS16550
Signature · 1 line
1.6.4
Applied
#1 lore raw

PATCH v3 1/1 qe: fixup the snum for MPC8569 Rev2.0

Quoted 10 lines · Liu Yu

Since 1.0 and 2.0 use different snum table,
we fixup the snum value according to SPRN_SVR.

---
v3:
move code from board to cpu

cpu/mpc85xx/fdt.c | 18 ++++++++++++++++++

1 files changed, 18 insertions(+), 0 deletions(-)

applied to 85xx

- k