aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/prom.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2012-01-25 09:03:19 -0500
committerRalf Baechle <ralf@linux-mips.org>2012-05-15 11:49:19 -0400
commit7d6168e57610a51404fb30e500345e2d92c20b18 (patch)
treef3848ea8c3b177217f778498500a8abce9299389 /arch/mips/include/asm/prom.h
parent0a4c531c2124cbb700484787327c516abbd76e70 (diff)
MIPS: Add helper function to allow platforms to point at a DTB.
Add __dt_setup_arch() that can be called to load a builtin DT. Additionally we add a macro to allow loading a specific symbol from the __dtb_* section. Signed-off-by: John Crispin <blogic@openwrt.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/3715/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/prom.h')
-rw-r--r--arch/mips/include/asm/prom.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/mips/include/asm/prom.h b/arch/mips/include/asm/prom.h
index 40ed25952e6b..7206d445bab8 100644
--- a/arch/mips/include/asm/prom.h
+++ b/arch/mips/include/asm/prom.h
@@ -36,6 +36,17 @@ static inline unsigned long pci_address_to_pio(phys_addr_t address)
36} 36}
37#define pci_address_to_pio pci_address_to_pio 37#define pci_address_to_pio pci_address_to_pio
38 38
39struct boot_param_header;
40
41extern void __dt_setup_arch(struct boot_param_header *bph);
42
43#define dt_setup_arch(sym) \
44({ \
45 extern struct boot_param_header __dtb_##sym##_begin; \
46 \
47 __dt_setup_arch(&__dtb_##sym##_begin); \
48})
49
39#else /* CONFIG_OF */ 50#else /* CONFIG_OF */
40static inline void device_tree_init(void) { } 51static inline void device_tree_init(void) { }
41#endif /* CONFIG_OF */ 52#endif /* CONFIG_OF */