Skip to content

Commit ad81fcb

Browse files
author
Rob Herring
committed
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>
1 parent 0288ffc commit ad81fcb

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

‎arch/arc/kernel/devtree.c‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
*/
2828
struct machine_desc * __init setup_machine_fdt(void *dt)
2929
{
30-
struct boot_param_header *devtree = dt;
3130
struct machine_desc *mdesc = NULL, *mdesc_best = NULL;
3231
unsigned int score, mdesc_score = ~1;
3332
unsigned long dt_root;
@@ -36,11 +35,9 @@ struct machine_desc * __init setup_machine_fdt(void *dt)
3635
char manufacturer[16];
3736
unsigned long len;
3837

39-
/* check device tree validity */
40-
if (be32_to_cpu(devtree->magic) != OF_DT_HEADER)
38+
if (!early_init_dt_scan(dt))
4139
return NULL;
4240

43-
initial_boot_params = devtree;
4441
dt_root = of_get_flat_dt_root();
4542

4643
/*
@@ -85,15 +82,6 @@ struct machine_desc * __init setup_machine_fdt(void *dt)
8582

8683
pr_info("Board \"%s\" from %s (Manufacturer)\n", model, manufacturer);
8784

88-
/* Retrieve various information from the /chosen node */
89-
of_scan_flat_dt(early_init_dt_scan_chosen, boot_command_line);
90-
91-
/* Initialize {size,address}-cells info */
92-
of_scan_flat_dt(early_init_dt_scan_root, NULL);
93-
94-
/* Setup memory, calling early_init_dt_add_memory_arch */
95-
of_scan_flat_dt(early_init_dt_scan_memory, NULL);
96-
9785
clk = of_get_flat_dt_prop(dt_root, "clock-frequency", &len);
9886
if (clk)
9987
arc_set_core_freq(of_read_ulong(clk, len/4));

0 commit comments

Comments
 (0)