[U-Boot] [PATCH] qe: fixup the snum for MPC8569 Rev2.0

Liu Yu yu.liu at freescale.com
Tue Jan 12 11:05:35 CET 2010


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

Signed-off-by: Liu Yu <yu.liu at freescale.com>
---
 board/freescale/mpc8569mds/mpc8569mds.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/board/freescale/mpc8569mds/mpc8569mds.c b/board/freescale/mpc8569mds/mpc8569mds.c
index cdd7813..db8ae5d 100644
--- a/board/freescale/mpc8569mds/mpc8569mds.c
+++ b/board/freescale/mpc8569mds/mpc8569mds.c
@@ -510,6 +510,18 @@ static void fdt_board_fixup_qe_usb(void *blob, bd_t *bd)
 	clrbits_8(&bcsr[17], BCSR17_nUSBEN);
 }
 
+static void fdt_board_fixup_qe_snum(void *blob, bd_t *bd)
+{
+	if (mfspr(SPRN_SVR) == 0x80880010) {
+		/* Rev1.0 uses snum 46 */
+		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);
+	}
+}
+
 #ifdef CONFIG_PCIE1
 static struct pci_controller pcie1_hose;
 #endif  /* CONFIG_PCIE1 */
@@ -654,5 +666,6 @@ void ft_board_setup(void *blob, bd_t *bd)
 	fdt_board_fixup_esdhc(blob, bd);
 	fdt_board_fixup_qe_uart(blob, bd);
 	fdt_board_fixup_qe_usb(blob, bd);
+	fdt_board_fixup_qe_snum(blob, bd);
 }
 #endif
-- 
1.6.4



More information about the U-Boot mailing list