diff options
Diffstat (limited to 'arch/powerpc/boot/dtc-src/livetree.c')
-rw-r--r-- | arch/powerpc/boot/dtc-src/livetree.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/powerpc/boot/dtc-src/livetree.c b/arch/powerpc/boot/dtc-src/livetree.c index 6ba0846b4310..0ca3de550b3f 100644 --- a/arch/powerpc/boot/dtc-src/livetree.c +++ b/arch/powerpc/boot/dtc-src/livetree.c | |||
@@ -115,6 +115,7 @@ void add_child(struct node *parent, struct node *child) | |||
115 | struct node **p; | 115 | struct node **p; |
116 | 116 | ||
117 | child->next_sibling = NULL; | 117 | child->next_sibling = NULL; |
118 | child->parent = parent; | ||
118 | 119 | ||
119 | p = &parent->children; | 120 | p = &parent->children; |
120 | while (*p) | 121 | while (*p) |
@@ -123,7 +124,8 @@ void add_child(struct node *parent, struct node *child) | |||
123 | *p = child; | 124 | *p = child; |
124 | } | 125 | } |
125 | 126 | ||
126 | struct reserve_info *build_reserve_entry(u64 address, u64 size, char *label) | 127 | struct reserve_info *build_reserve_entry(uint64_t address, uint64_t size, |
128 | char *label) | ||
127 | { | 129 | { |
128 | struct reserve_info *new = xmalloc(sizeof(*new)); | 130 | struct reserve_info *new = xmalloc(sizeof(*new)); |
129 | 131 | ||
@@ -165,13 +167,14 @@ struct reserve_info *add_reserve_entry(struct reserve_info *list, | |||
165 | } | 167 | } |
166 | 168 | ||
167 | struct boot_info *build_boot_info(struct reserve_info *reservelist, | 169 | struct boot_info *build_boot_info(struct reserve_info *reservelist, |
168 | struct node *tree) | 170 | struct node *tree, uint32_t boot_cpuid_phys) |
169 | { | 171 | { |
170 | struct boot_info *bi; | 172 | struct boot_info *bi; |
171 | 173 | ||
172 | bi = xmalloc(sizeof(*bi)); | 174 | bi = xmalloc(sizeof(*bi)); |
173 | bi->reservelist = reservelist; | 175 | bi->reservelist = reservelist; |
174 | bi->dt = tree; | 176 | bi->dt = tree; |
177 | bi->boot_cpuid_phys = boot_cpuid_phys; | ||
175 | 178 | ||
176 | return bi; | 179 | return bi; |
177 | } | 180 | } |
@@ -202,7 +205,7 @@ struct property *get_property(struct node *node, const char *propname) | |||
202 | cell_t propval_cell(struct property *prop) | 205 | cell_t propval_cell(struct property *prop) |
203 | { | 206 | { |
204 | assert(prop->val.len == sizeof(cell_t)); | 207 | assert(prop->val.len == sizeof(cell_t)); |
205 | return be32_to_cpu(*((cell_t *)prop->val.val)); | 208 | return fdt32_to_cpu(*((cell_t *)prop->val.val)); |
206 | } | 209 | } |
207 | 210 | ||
208 | struct node *get_subnode(struct node *node, const char *nodename) | 211 | struct node *get_subnode(struct node *node, const char *nodename) |