Commit a94b89a4 authored by Scott Wood's avatar Scott Wood Committed by Kumar Gala

[POWERPC] bootwrapper: Use fsl_get_immr() in cuboot-pq2.c.

Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent bbc6fac3
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "stdio.h" #include "stdio.h"
#include "cuboot.h" #include "cuboot.h"
#include "io.h" #include "io.h"
#include "fsl-soc.h"
#define TARGET_CPM2 #define TARGET_CPM2
#define TARGET_HAS_ETH1 #define TARGET_HAS_ETH1
...@@ -139,23 +140,20 @@ static void fixup_pci(void) ...@@ -139,23 +140,20 @@ static void fixup_pci(void)
u32 *pci_regs[3]; u32 *pci_regs[3];
u8 *soc_regs; u8 *soc_regs;
int i, len; int i, len;
void *node, *parent_node, *soc_node; void *node, *parent_node;
u32 naddr, nsize, mem_log2; u32 naddr, nsize, mem_log2;
node = finddevice("/pci"); node = finddevice("/pci");
if (!node || !dt_is_compatible(node, "fsl,pq2-pci")) if (!node || !dt_is_compatible(node, "fsl,pq2-pci"))
return; return;
soc_node = finddevice("/soc");
if (!soc_node || !dt_is_compatible(soc_node, "fsl,pq2-soc"))
goto err;
for (i = 0; i < 3; i++) for (i = 0; i < 3; i++)
if (!dt_xlate_reg(node, i, if (!dt_xlate_reg(node, i,
(unsigned long *)&pci_regs[i], NULL)) (unsigned long *)&pci_regs[i], NULL))
goto err; 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; goto err;
dt_get_reg_format(node, &naddr, &nsize); dt_get_reg_format(node, &naddr, &nsize);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment