aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/include/asm/mips-boards/generic.h4
-rw-r--r--arch/mips/include/asm/prom.h6
-rw-r--r--arch/mips/kernel/prom.c2
-rw-r--r--arch/mips/lantiq/prom.c2
-rw-r--r--arch/mips/lantiq/prom.h2
-rw-r--r--arch/mips/mti-sead3/sead3-setup.c8
-rw-r--r--arch/mips/ralink/of.c4
7 files changed, 13 insertions, 15 deletions
diff --git a/arch/mips/include/asm/mips-boards/generic.h b/arch/mips/include/asm/mips-boards/generic.h
index 48616816bcbc..b969491aa98d 100644
--- a/arch/mips/include/asm/mips-boards/generic.h
+++ b/arch/mips/include/asm/mips-boards/generic.h
@@ -67,9 +67,7 @@
67 67
68extern int mips_revision_sconid; 68extern int mips_revision_sconid;
69 69
70#ifdef CONFIG_OF 70extern char __dtb_start[];
71extern struct boot_param_header __dtb_start;
72#endif
73 71
74#ifdef CONFIG_PCI 72#ifdef CONFIG_PCI
75extern void mips_pcibios_init(void); 73extern void mips_pcibios_init(void);
diff --git a/arch/mips/include/asm/prom.h b/arch/mips/include/asm/prom.h
index ccd2b75f152c..a9494c0141fb 100644
--- a/arch/mips/include/asm/prom.h
+++ b/arch/mips/include/asm/prom.h
@@ -21,13 +21,13 @@ extern void device_tree_init(void);
21 21
22struct boot_param_header; 22struct boot_param_header;
23 23
24extern void __dt_setup_arch(struct boot_param_header *bph); 24extern void __dt_setup_arch(void *bph);
25 25
26#define dt_setup_arch(sym) \ 26#define dt_setup_arch(sym) \
27({ \ 27({ \
28 extern struct boot_param_header __dtb_##sym##_begin; \ 28 extern char __dtb_##sym##_begin[]; \
29 \ 29 \
30 __dt_setup_arch(&__dtb_##sym##_begin); \ 30 __dt_setup_arch(__dtb_##sym##_begin); \
31}) 31})
32 32
33#else /* CONFIG_OF */ 33#else /* CONFIG_OF */
diff --git a/arch/mips/kernel/prom.c b/arch/mips/kernel/prom.c
index 3c3b0df8f48d..5d39bb85bf35 100644
--- a/arch/mips/kernel/prom.c
+++ b/arch/mips/kernel/prom.c
@@ -47,7 +47,7 @@ void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
47 return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS)); 47 return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS));
48} 48}
49 49
50void __init __dt_setup_arch(struct boot_param_header *bph) 50void __init __dt_setup_arch(void *bph)
51{ 51{
52 if (!early_init_dt_scan(bph)) 52 if (!early_init_dt_scan(bph))
53 return; 53 return;
diff --git a/arch/mips/lantiq/prom.c b/arch/mips/lantiq/prom.c
index cdea687ad490..7447d322d14e 100644
--- a/arch/mips/lantiq/prom.c
+++ b/arch/mips/lantiq/prom.c
@@ -71,7 +71,7 @@ void __init plat_mem_setup(void)
71 * Load the builtin devicetree. This causes the chosen node to be 71 * Load the builtin devicetree. This causes the chosen node to be
72 * parsed resulting in our memory appearing 72 * parsed resulting in our memory appearing
73 */ 73 */
74 __dt_setup_arch(&__dtb_start); 74 __dt_setup_arch(__dtb_start);
75} 75}
76 76
77void __init device_tree_init(void) 77void __init device_tree_init(void)
diff --git a/arch/mips/lantiq/prom.h b/arch/mips/lantiq/prom.h
index 8e07b5f28ef1..69a4c582338d 100644
--- a/arch/mips/lantiq/prom.h
+++ b/arch/mips/lantiq/prom.h
@@ -26,6 +26,6 @@ struct ltq_soc_info {
26extern void ltq_soc_detect(struct ltq_soc_info *i); 26extern void ltq_soc_detect(struct ltq_soc_info *i);
27extern void ltq_soc_init(void); 27extern void ltq_soc_init(void);
28 28
29extern struct boot_param_header __dtb_start; 29extern char __dtb_start[];
30 30
31#endif 31#endif
diff --git a/arch/mips/mti-sead3/sead3-setup.c b/arch/mips/mti-sead3/sead3-setup.c
index bf7fe48bf2f9..e43f4801a245 100644
--- a/arch/mips/mti-sead3/sead3-setup.c
+++ b/arch/mips/mti-sead3/sead3-setup.c
@@ -69,17 +69,17 @@ static void __init parse_memsize_param(void)
69 if (!memsize) 69 if (!memsize)
70 return; 70 return;
71 71
72 offset = fdt_path_offset(&__dtb_start, "/memory"); 72 offset = fdt_path_offset(__dtb_start, "/memory");
73 if (offset > 0) { 73 if (offset > 0) {
74 uint64_t new_value; 74 uint64_t new_value;
75 /* 75 /*
76 * reg contains 2 32-bits BE values, offset and size. We just 76 * reg contains 2 32-bits BE values, offset and size. We just
77 * want to replace the size value without affecting the offset 77 * want to replace the size value without affecting the offset
78 */ 78 */
79 prop_value = fdt_getprop(&__dtb_start, offset, "reg", &prop_len); 79 prop_value = fdt_getprop(__dtb_start, offset, "reg", &prop_len);
80 new_value = be64_to_cpu(*prop_value); 80 new_value = be64_to_cpu(*prop_value);
81 new_value = (new_value & ~0xffffffffllu) | memsize; 81 new_value = (new_value & ~0xffffffffllu) | memsize;
82 fdt_setprop_inplace_u64(&__dtb_start, offset, "reg", new_value); 82 fdt_setprop_inplace_u64(__dtb_start, offset, "reg", new_value);
83 } 83 }
84} 84}
85 85
@@ -92,7 +92,7 @@ void __init plat_mem_setup(void)
92 * Load the builtin devicetree. This causes the chosen node to be 92 * Load the builtin devicetree. This causes the chosen node to be
93 * parsed resulting in our memory appearing 93 * parsed resulting in our memory appearing
94 */ 94 */
95 __dt_setup_arch(&__dtb_start); 95 __dt_setup_arch(__dtb_start);
96} 96}
97 97
98void __init device_tree_init(void) 98void __init device_tree_init(void)
diff --git a/arch/mips/ralink/of.c b/arch/mips/ralink/of.c
index 0170d829d073..91d7060d5aea 100644
--- a/arch/mips/ralink/of.c
+++ b/arch/mips/ralink/of.c
@@ -28,7 +28,7 @@
28__iomem void *rt_sysc_membase; 28__iomem void *rt_sysc_membase;
29__iomem void *rt_memc_membase; 29__iomem void *rt_memc_membase;
30 30
31extern struct boot_param_header __dtb_start; 31extern char __dtb_start[];
32 32
33__iomem void *plat_of_remap_node(const char *node) 33__iomem void *plat_of_remap_node(const char *node)
34{ 34{
@@ -63,7 +63,7 @@ void __init plat_mem_setup(void)
63 * Load the builtin devicetree. This causes the chosen node to be 63 * Load the builtin devicetree. This causes the chosen node to be
64 * parsed resulting in our memory appearing 64 * parsed resulting in our memory appearing
65 */ 65 */
66 __dt_setup_arch(&__dtb_start); 66 __dt_setup_arch(__dtb_start);
67 67
68 if (soc_info.mem_size) 68 if (soc_info.mem_size)
69 add_memory_region(soc_info.mem_base, soc_info.mem_size * SZ_1M, 69 add_memory_region(soc_info.mem_base, soc_info.mem_size * SZ_1M,