arc: use early_init_dt_scan
Convert arc to use new early_init_dt_scan function. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Vineet Gupta <vgupta@synopsys.com>
This commit is contained in:
parent
0288ffcbfd
commit
ad81fcb530
1 changed files with 1 additions and 13 deletions
|
@ -27,7 +27,6 @@
|
||||||
*/
|
*/
|
||||||
struct machine_desc * __init setup_machine_fdt(void *dt)
|
struct machine_desc * __init setup_machine_fdt(void *dt)
|
||||||
{
|
{
|
||||||
struct boot_param_header *devtree = dt;
|
|
||||||
struct machine_desc *mdesc = NULL, *mdesc_best = NULL;
|
struct machine_desc *mdesc = NULL, *mdesc_best = NULL;
|
||||||
unsigned int score, mdesc_score = ~1;
|
unsigned int score, mdesc_score = ~1;
|
||||||
unsigned long dt_root;
|
unsigned long dt_root;
|
||||||
|
@ -36,11 +35,9 @@ struct machine_desc * __init setup_machine_fdt(void *dt)
|
||||||
char manufacturer[16];
|
char manufacturer[16];
|
||||||
unsigned long len;
|
unsigned long len;
|
||||||
|
|
||||||
/* check device tree validity */
|
if (!early_init_dt_scan(dt))
|
||||||
if (be32_to_cpu(devtree->magic) != OF_DT_HEADER)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
initial_boot_params = devtree;
|
|
||||||
dt_root = of_get_flat_dt_root();
|
dt_root = of_get_flat_dt_root();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -85,15 +82,6 @@ struct machine_desc * __init setup_machine_fdt(void *dt)
|
||||||
|
|
||||||
pr_info("Board \"%s\" from %s (Manufacturer)\n", model, manufacturer);
|
pr_info("Board \"%s\" from %s (Manufacturer)\n", model, manufacturer);
|
||||||
|
|
||||||
/* Retrieve various information from the /chosen node */
|
|
||||||
of_scan_flat_dt(early_init_dt_scan_chosen, boot_command_line);
|
|
||||||
|
|
||||||
/* Initialize {size,address}-cells info */
|
|
||||||
of_scan_flat_dt(early_init_dt_scan_root, NULL);
|
|
||||||
|
|
||||||
/* Setup memory, calling early_init_dt_add_memory_arch */
|
|
||||||
of_scan_flat_dt(early_init_dt_scan_memory, NULL);
|
|
||||||
|
|
||||||
clk = of_get_flat_dt_prop(dt_root, "clock-frequency", &len);
|
clk = of_get_flat_dt_prop(dt_root, "clock-frequency", &len);
|
||||||
if (clk)
|
if (clk)
|
||||||
arc_set_core_freq(of_read_ulong(clk, len/4));
|
arc_set_core_freq(of_read_ulong(clk, len/4));
|
||||||
|
|
Loading…
Add table
Reference in a new issue