提交 97e7f455 编写于 作者: R Rob Herring

mips: use common of_flat_dt_get_machine_name

Convert mips to use the common of_flat_dt_get_machine_name function.
Signed-off-by: NRob Herring <rob.herring@calxeda.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Acked-by: NJohn Crispin <blogic@openwrt.org>
上级 986c494b
...@@ -47,24 +47,11 @@ void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) ...@@ -47,24 +47,11 @@ void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS)); return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS));
} }
int __init early_init_dt_scan_model(unsigned long node, const char *uname,
int depth, void *data)
{
if (!depth) {
char *model = of_get_flat_dt_prop(node, "model", NULL);
if (model)
mips_set_machine_name(model);
}
return 0;
}
void __init __dt_setup_arch(struct boot_param_header *bph) void __init __dt_setup_arch(struct boot_param_header *bph)
{ {
if (!early_init_dt_scan(bph)) if (!early_init_dt_scan(bph))
return; return;
/* try to load the mips machine name */ mips_set_machine_name(of_flat_dt_get_machine_name());
of_scan_flat_dt(early_init_dt_scan_model, NULL);
} }
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册