aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2013-08-26 11:12:22 -0400
committerRob Herring <rob.herring@calxeda.com>2013-10-09 12:38:08 -0400
commitad81fcb53033be98ab29c6cfb6ef0249a8e2ffaa (patch)
tree80d9822cd3f3ab809bea26535c0a9d6243ede8de /arch/arc
parent0288ffcbfdf9b8656e7320c24caa1e4c1d498287 (diff)
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>
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/kernel/devtree.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/arch/arc/kernel/devtree.c b/arch/arc/kernel/devtree.c
index eeb613aa44ff..1ab6f3569f60 100644
--- a/arch/arc/kernel/devtree.c
+++ b/arch/arc/kernel/devtree.c
@@ -27,7 +27,6 @@
27 */ 27 */
28struct machine_desc * __init setup_machine_fdt(void *dt) 28struct machine_desc * __init setup_machine_fdt(void *dt)
29{ 29{
30 struct boot_param_header *devtree = dt;
31 struct machine_desc *mdesc = NULL, *mdesc_best = NULL; 30 struct machine_desc *mdesc = NULL, *mdesc_best = NULL;
32 unsigned int score, mdesc_score = ~1; 31 unsigned int score, mdesc_score = ~1;
33 unsigned long dt_root; 32 unsigned long dt_root;
@@ -36,11 +35,9 @@ struct machine_desc * __init setup_machine_fdt(void *dt)
36 char manufacturer[16]; 35 char manufacturer[16];
37 unsigned long len; 36 unsigned long len;
38 37
39 /* check device tree validity */ 38 if (!early_init_dt_scan(dt))
40 if (be32_to_cpu(devtree->magic) != OF_DT_HEADER)
41 return NULL; 39 return NULL;
42 40
43 initial_boot_params = devtree;
44 dt_root = of_get_flat_dt_root(); 41 dt_root = of_get_flat_dt_root();
45 42
46 /* 43 /*
@@ -85,15 +82,6 @@ struct machine_desc * __init setup_machine_fdt(void *dt)
85 82
86 pr_info("Board \"%s\" from %s (Manufacturer)\n", model, manufacturer); 83 pr_info("Board \"%s\" from %s (Manufacturer)\n", model, manufacturer);
87 84
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
97 clk = of_get_flat_dt_prop(dt_root, "clock-frequency", &len); 85 clk = of_get_flat_dt_prop(dt_root, "clock-frequency", &len);
98 if (clk) 86 if (clk)
99 arc_set_core_freq(of_read_ulong(clk, len/4)); 87 arc_set_core_freq(of_read_ulong(clk, len/4));