aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/boot/cuboot-pq2.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/powerpc/boot/cuboot-pq2.c b/arch/powerpc/boot/cuboot-pq2.c
index d3d3388d55..470ffacb83 100644
--- a/arch/powerpc/boot/cuboot-pq2.c
+++ b/arch/powerpc/boot/cuboot-pq2.c
@@ -15,6 +15,7 @@
15#include "stdio.h" 15#include "stdio.h"
16#include "cuboot.h" 16#include "cuboot.h"
17#include "io.h" 17#include "io.h"
18#include "fsl-soc.h"
18 19
19#define TARGET_CPM2 20#define TARGET_CPM2
20#define TARGET_HAS_ETH1 21#define TARGET_HAS_ETH1
@@ -139,23 +140,20 @@ static void fixup_pci(void)
139 u32 *pci_regs[3]; 140 u32 *pci_regs[3];
140 u8 *soc_regs; 141 u8 *soc_regs;
141 int i, len; 142 int i, len;
142 void *node, *parent_node, *soc_node; 143 void *node, *parent_node;
143 u32 naddr, nsize, mem_log2; 144 u32 naddr, nsize, mem_log2;
144 145
145 node = finddevice("/pci"); 146 node = finddevice("/pci");
146 if (!node || !dt_is_compatible(node, "fsl,pq2-pci")) 147 if (!node || !dt_is_compatible(node, "fsl,pq2-pci"))
147 return; 148 return;
148 149
149 soc_node = finddevice("/soc");
150 if (!soc_node || !dt_is_compatible(soc_node, "fsl,pq2-soc"))
151 goto err;
152
153 for (i = 0; i < 3; i++) 150 for (i = 0; i < 3; i++)
154 if (!dt_xlate_reg(node, i, 151 if (!dt_xlate_reg(node, i,
155 (unsigned long *)&pci_regs[i], NULL)) 152 (unsigned long *)&pci_regs[i], NULL))
156 goto err; 153 goto err;
157 154
158 if (!dt_xlate_reg(soc_node, 0, (unsigned long *)&soc_regs, NULL)) 155 soc_regs = (u8 *)fsl_get_immr();
156 if (!soc_regs)
159 goto err; 157 goto err;
160 158
161 dt_get_reg_format(node, &naddr, &nsize); 159 dt_get_reg_format(node, &naddr, &nsize);