perf tools: Don't clone maps from parent when synthesizing forks
[linux/fpc-iii.git] / arch / nios2 / kernel / prom.c
bloba6d4f7530247b34897f54d4f7b882153619e4fdb
1 /*
2 * Device tree support
4 * Copyright (C) 2013, 2015 Altera Corporation
5 * Copyright (C) 2010 Thomas Chou <thomas@wytron.com.tw>
7 * Based on MIPS support for CONFIG_OF device tree support
9 * Copyright (C) 2010 Cisco Systems Inc. <dediao@cisco.com>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 #include <linux/init.h>
27 #include <linux/types.h>
28 #include <linux/bootmem.h>
29 #include <linux/of.h>
30 #include <linux/of_fdt.h>
31 #include <linux/io.h>
33 #include <asm/sections.h>
35 void __init early_init_devtree(void *params)
37 __be32 *dtb = (u32 *)__dtb_start;
38 #if defined(CONFIG_NIOS2_DTB_AT_PHYS_ADDR)
39 if (be32_to_cpup((__be32 *)CONFIG_NIOS2_DTB_PHYS_ADDR) ==
40 OF_DT_HEADER) {
41 params = (void *)CONFIG_NIOS2_DTB_PHYS_ADDR;
42 early_init_dt_scan(params);
43 return;
45 #endif
46 if (be32_to_cpu((__be32) *dtb) == OF_DT_HEADER)
47 params = (void *)__dtb_start;
49 early_init_dt_scan(params);