Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81300
b: refs/heads/master
c: 6c7e072
h: refs/heads/master
v: v3
  • Loading branch information
Scott Wood authored and Kumar Gala committed Jan 24, 2008
1 parent 26aadef commit d09c600
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c7d24a2dd02b9fe736e13931ee3e4a1f4f89cb47
refs/heads/master: 6c7e072b1682eeb7c17ed5fdec0672fcf3ccb205
12 changes: 10 additions & 2 deletions trunk/arch/powerpc/sysdev/fsl_soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,18 @@ phys_addr_t get_immrbase(void)
soc = of_find_node_by_type(NULL, "soc");
if (soc) {
int size;
const void *prop = of_get_property(soc, "reg", &size);
u32 naddr;
const u32 *prop = of_get_property(soc, "#address-cells", &size);

if (prop && size == 4)
naddr = *prop;
else
naddr = 2;

prop = of_get_property(soc, "ranges", &size);
if (prop)
immrbase = of_translate_address(soc, prop);
immrbase = of_translate_address(soc, prop + naddr);

of_node_put(soc);
}

Expand Down

0 comments on commit d09c600

Please sign in to comment.