[PATCH 9/9] bootwrapper: Use fsl_get_immr() in cuboot-pq2.c.

Scott Wood scottwood at freescale.com
Thu Aug 30 02:47:50 EST 2007


Signed-off-by: Scott Wood <scottwood at freescale.com>
---
 arch/powerpc/boot/cuboot-pq2.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/boot/cuboot-pq2.c b/arch/powerpc/boot/cuboot-pq2.c
index 8021fd4..9d12ddd 100644
--- a/arch/powerpc/boot/cuboot-pq2.c
+++ b/arch/powerpc/boot/cuboot-pq2.c
@@ -15,6 +15,7 @@
 #include "stdio.h"
 #include "cuboot.h"
 #include "io.h"
+#include "fsl-soc.h"
 
 #define TARGET_CPM2
 #define TARGET_HAS_ETH1
@@ -139,23 +140,20 @@ static void fixup_pci(void)
 	u32 *pci_regs[3];
 	u8 *soc_regs;
 	int i, len;
-	void *ctrl_node, *bus_node, *parent_node, *soc_node;
+	void *ctrl_node, *bus_node, *parent_node;
 	u32 naddr, nsize, bus_ph, mem_log2;
 
 	ctrl_node = finddevice("/soc/pci");
 	if (!ctrl_node || !dt_is_compatible(ctrl_node, "fsl,pq2-pci"))
 		return;
 
-	soc_node = finddevice("/soc");
-	if (!soc_node || !dt_is_compatible(soc_node, "fsl,pq2-soc"))
-		goto err;
-
 	for (i = 0; i < 3; i++)
 		if (!dt_xlate_reg(ctrl_node, i,
 		                  (unsigned long *)&pci_regs[i], NULL))
 			goto err;
 
-	if (!dt_xlate_reg(soc_node, 0, (unsigned long *)&soc_regs, NULL))
+	soc_regs = (u8 *)fsl_get_immr();
+	if (!soc_regs)
 		goto err;
 
 	len = getprop(ctrl_node, "fsl,bus", &bus_ph, 4);
-- 
1.5.0.3



More information about the Linuxppc-dev mailing list