]> git.karo-electronics.de Git - karo-tx-linux.git/blob - arch/mips/mti-sead3/sead3-setup.c
MIPS: generic: Introduce generic DT-based board support
[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  * Copyright (C) 2013 Imagination Technologies Ltd.
8  */
9 #include <linux/init.h>
10 #include <linux/libfdt.h>
11 #include <linux/of_fdt.h>
12
13 #include <asm/prom.h>
14
15 #include <asm/mach-sead3/sead3-dtshim.h>
16 #include <asm/mips-boards/generic.h>
17
18 const char *get_system_type(void)
19 {
20         return "MIPS SEAD3";
21 }
22
23 void __init *plat_get_fdt(void)
24 {
25         return (void *)__dtb_start;
26 }
27
28 void __init plat_mem_setup(void)
29 {
30         void *fdt = plat_get_fdt();
31
32         fdt = sead3_dt_shim(fdt);
33         __dt_setup_arch(fdt);
34 }
35
36 void __init device_tree_init(void)
37 {
38         unflatten_and_copy_device_tree();
39 }