Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0cdde839 authored by Rob Herring's avatar Rob Herring
Browse files

mips: convert fdt pointers to opaque pointers



The architecture code does not need to access the internals of the FDT
blob directly, so make the pointers to it void * and use char arrays
for section variables.

Signed-off-by: default avatarRob Herring <robh@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Tested-by: default avatarGrant Likely <grant.likely@linaro.org>
parent 01984a6f
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -67,9 +67,7 @@

extern int mips_revision_sconid;

#ifdef CONFIG_OF
extern struct boot_param_header __dtb_start;
#endif
extern char __dtb_start[];

#ifdef CONFIG_PCI
extern void mips_pcibios_init(void);
+3 −3
Original line number Diff line number Diff line
@@ -21,13 +21,13 @@ extern void device_tree_init(void);

struct boot_param_header;

extern void __dt_setup_arch(struct boot_param_header *bph);
extern void __dt_setup_arch(void *bph);

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

#else /* CONFIG_OF */
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
	return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS));
}

void __init __dt_setup_arch(struct boot_param_header *bph)
void __init __dt_setup_arch(void *bph)
{
	if (!early_init_dt_scan(bph))
		return;
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ void __init plat_mem_setup(void)
	 * Load the builtin devicetree. This causes the chosen node to be
	 * parsed resulting in our memory appearing
	 */
	__dt_setup_arch(&__dtb_start);
	__dt_setup_arch(__dtb_start);
}

void __init device_tree_init(void)
+1 −1
Original line number Diff line number Diff line
@@ -26,6 +26,6 @@ struct ltq_soc_info {
extern void ltq_soc_detect(struct ltq_soc_info *i);
extern void ltq_soc_init(void);

extern struct boot_param_header __dtb_start;
extern char __dtb_start[];

#endif
Loading