]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - arch/mips/mti-sead3/sead3-setup.c
Merge remote-tracking branch 'driver-core/driver-core-next'
[karo-tx-linux.git] / arch / mips / mti-sead3 / sead3-setup.c
1 /*
2  * This file is subject to the terms and conditions of the GNU General Public
3  * License.  See the file "COPYING" in the main directory of this archive
4  * for more details.
5  *
6  * Copyright (C) 2012 MIPS Technologies, Inc.  All rights reserved.
7  */
8 #include <linux/init.h>
9 #include <linux/of_platform.h>
10 #include <linux/of_fdt.h>
11 #include <linux/bootmem.h>
12
13 #include <asm/prom.h>
14
15 #include <asm/mips-boards/generic.h>
16
17 const char *get_system_type(void)
18 {
19         return "MIPS SEAD3";
20 }
21
22 void __init plat_mem_setup(void)
23 {
24         /*
25          * Load the builtin devicetree. This causes the chosen node to be
26          * parsed resulting in our memory appearing
27          */
28         __dt_setup_arch(&__dtb_start);
29 }
30
31 void __init device_tree_init(void)
32 {
33         unsigned long base, size;
34
35         if (!initial_boot_params)
36                 return;
37
38         base = virt_to_phys((void *)initial_boot_params);
39         size = be32_to_cpu(initial_boot_params->totalsize);
40
41         /* Before we do anything, lets reserve the dt blob */
42         reserve_bootmem(base, size, BOOTMEM_DEFAULT);
43
44         unflatten_device_tree();
45 }