Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309067
b: refs/heads/master
c: 7d6168e
h: refs/heads/master
i:
  309065: 5bbf2c4
  309063: 3b1f2b6
v: v3
  • Loading branch information
Ralf Baechle committed May 15, 2012
1 parent 83dbc63 commit 866d521
Show file tree
Hide file tree
Showing 3 changed files with 23 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: 0a4c531c2124cbb700484787327c516abbd76e70
refs/heads/master: 7d6168e57610a51404fb30e500345e2d92c20b18
11 changes: 11 additions & 0 deletions trunk/arch/mips/include/asm/prom.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ static inline unsigned long pci_address_to_pio(phys_addr_t address)
}
#define pci_address_to_pio pci_address_to_pio

struct boot_param_header;

extern void __dt_setup_arch(struct boot_param_header *bph);

#define dt_setup_arch(sym) \
({ \
extern struct boot_param_header __dtb_##sym##_begin; \
\
__dt_setup_arch(&__dtb_##sym##_begin); \
})

#else /* CONFIG_OF */
static inline void device_tree_init(void) { }
#endif /* CONFIG_OF */
Expand Down
11 changes: 11 additions & 0 deletions trunk/arch/mips/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,14 @@ void __init device_tree_init(void)
/* free the space reserved for the dt blob */
free_mem_mach(base, size);
}

void __init __dt_setup_arch(struct boot_param_header *bph)
{
if (be32_to_cpu(bph->magic) != OF_DT_HEADER) {
pr_err("DTB has bad magic, ignoring builtin OF DTB\n");

return;
}

initial_boot_params = bph;
}

0 comments on commit 866d521

Please sign in to comment.