diff options
Diffstat (limited to 'arch/powerpc/sysdev/fsl_soc.c')
-rw-r--r-- | arch/powerpc/sysdev/fsl_soc.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 474cb8e22f64..f2c0988a03b8 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -55,10 +55,18 @@ phys_addr_t get_immrbase(void) | |||
55 | soc = of_find_node_by_type(NULL, "soc"); | 55 | soc = of_find_node_by_type(NULL, "soc"); |
56 | if (soc) { | 56 | if (soc) { |
57 | int size; | 57 | int size; |
58 | const void *prop = of_get_property(soc, "reg", &size); | 58 | u32 naddr; |
59 | const u32 *prop = of_get_property(soc, "#address-cells", &size); | ||
59 | 60 | ||
61 | if (prop && size == 4) | ||
62 | naddr = *prop; | ||
63 | else | ||
64 | naddr = 2; | ||
65 | |||
66 | prop = of_get_property(soc, "ranges", &size); | ||
60 | if (prop) | 67 | if (prop) |
61 | immrbase = of_translate_address(soc, prop); | 68 | immrbase = of_translate_address(soc, prop + naddr); |
69 | |||
62 | of_node_put(soc); | 70 | of_node_put(soc); |
63 | } | 71 | } |
64 | 72 | ||