Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360192
b: refs/heads/master
c: eab6a08
h: refs/heads/master
v: v3
  • Loading branch information
Vineet Gupta committed Feb 26, 2013
1 parent efb9466 commit 55e1e57
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fc32781bfdb56dad883469b65e468e749ef35fe5
refs/heads/master: eab6a08c082b82dff884eb49a2229b0474d0b7e5
2 changes: 2 additions & 0 deletions trunk/arch/arc/include/asm/mach_desc.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,6 @@ __attribute__((__section__(".arch.info.init"))) = { \
};

extern struct machine_desc *setup_machine_fdt(void *dt);
extern void __init copy_devtree(void);

#endif
15 changes: 15 additions & 0 deletions trunk/arch/arc/kernel/devtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,18 @@ struct machine_desc * __init setup_machine_fdt(void *dt)

return mdesc_best;
}

/*
* Copy the flattened DT out of .init since unflattening doesn't copy strings
* and the normal DT APIs refs them from orig flat DT
*/
void __init copy_devtree(void)
{
void *alloc = early_init_dt_alloc_memory_arch(
be32_to_cpu(initial_boot_params->totalsize), 64);
if (alloc) {
memcpy(alloc, initial_boot_params,
be32_to_cpu(initial_boot_params->totalsize));
initial_boot_params = alloc;
}
}
2 changes: 2 additions & 0 deletions trunk/arch/arc/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ void __init setup_arch(char **cmdline_p)

setup_arch_memory();

/* copy flat DT out of .init and then unflatten it */
copy_devtree();
unflatten_device_tree();

/* Can be issue if someone passes cmd line arg "ro"
Expand Down

0 comments on commit 55e1e57

Please sign in to comment.