d12213c38ba28220008828af71e140d04f2858bc
[openwrt/openwrt.git] / target / linux / ramips / patches-3.8 / 0205-owrt-MIPS-add-OWRTDTB-secion.patch
1 From 6beb1af1b1475478c8f275b9579c9ebe4dad2904 Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Tue, 19 Mar 2013 10:16:42 +0100
4 Subject: [PATCH 205/208] owrt: MIPS: add OWRTDTB secion
5
6 Signed-off-by: John Crispin <blogic@openwrt.org>
7 ---
8 arch/mips/kernel/head.S | 3 +++
9 arch/mips/ralink/Makefile | 2 +-
10 arch/mips/ralink/of.c | 4 +++-
11 3 files changed, 7 insertions(+), 2 deletions(-)
12
13 diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
14 index c61cdae..b4e55bb 100644
15 --- a/arch/mips/kernel/head.S
16 +++ b/arch/mips/kernel/head.S
17 @@ -140,6 +140,9 @@ FEXPORT(__kernel_entry)
18 j kernel_entry
19 #endif
20
21 + .ascii "OWRTDTB:"
22 + EXPORT(__image_dtb)
23 + .fill 0x4000
24 __REF
25
26 NESTED(kernel_entry, 16, sp) # kernel entry point
27 diff --git a/arch/mips/ralink/Makefile b/arch/mips/ralink/Makefile
28 index 8572538..9e58aa1 100644
29 --- a/arch/mips/ralink/Makefile
30 +++ b/arch/mips/ralink/Makefile
31 @@ -15,4 +15,4 @@ obj-$(CONFIG_SOC_MT7620) += mt7620.o
32
33 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
34
35 -obj-y += dts/
36 +#obj-y += dts/
37 diff --git a/arch/mips/ralink/of.c b/arch/mips/ralink/of.c
38 index f438145..ee998b7 100644
39 --- a/arch/mips/ralink/of.c
40 +++ b/arch/mips/ralink/of.c
41 @@ -76,6 +76,8 @@ void __init device_tree_init(void)
42 free_bootmem(base, size);
43 }
44
45 +extern struct boot_param_header __image_dtb;
46 +
47 void __init plat_mem_setup(void)
48 {
49 set_io_port_base(KSEG1);
50 @@ -84,7 +86,7 @@ void __init plat_mem_setup(void)
51 * Load the builtin devicetree. This causes the chosen node to be
52 * parsed resulting in our memory appearing
53 */
54 - __dt_setup_arch(&__dtb_start);
55 + __dt_setup_arch(&__image_dtb);
56 }
57
58 static int __init plat_of_setup(void)
59 --
60 1.7.10.4
61