Steven J. Hill | 3070033 | 2012-05-30 21:02:49 +0000 | [diff] [blame] | 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. |
Qais Yousef | 4432723 | 2013-12-06 11:00:42 +0000 | [diff] [blame] | 7 | * Copyright (C) 2013 Imagination Technologies Ltd. |
Steven J. Hill | 3070033 | 2012-05-30 21:02:49 +0000 | [diff] [blame] | 8 | */ |
| 9 | #include <linux/init.h> |
Qais Yousef | 4432723 | 2013-12-06 11:00:42 +0000 | [diff] [blame] | 10 | #include <linux/libfdt.h> |
Steven J. Hill | 9b73100 | 2013-01-17 11:37:03 -0600 | [diff] [blame] | 11 | #include <linux/of_fdt.h> |
Steven J. Hill | 9b73100 | 2013-01-17 11:37:03 -0600 | [diff] [blame] | 12 | |
Rob Herring | 089a49b | 2013-09-07 14:58:54 -0500 | [diff] [blame] | 13 | #include <asm/prom.h> |
| 14 | |
Paul Burton | b6d5e47 | 2016-08-26 15:17:34 +0100 | [diff] [blame] | 15 | #include <asm/mach-sead3/sead3-dtshim.h> |
Steven J. Hill | 9b73100 | 2013-01-17 11:37:03 -0600 | [diff] [blame] | 16 | #include <asm/mips-boards/generic.h> |
Steven J. Hill | 3070033 | 2012-05-30 21:02:49 +0000 | [diff] [blame] | 17 | |
Steven J. Hill | 3070033 | 2012-05-30 21:02:49 +0000 | [diff] [blame] | 18 | const char *get_system_type(void) |
| 19 | { |
| 20 | return "MIPS SEAD3"; |
| 21 | } |
| 22 | |
Matt Redfearn | 5e7c1c9 | 2016-03-31 10:05:40 +0100 | [diff] [blame] | 23 | void __init *plat_get_fdt(void) |
| 24 | { |
| 25 | return (void *)__dtb_start; |
| 26 | } |
| 27 | |
Steven J. Hill | 3070033 | 2012-05-30 21:02:49 +0000 | [diff] [blame] | 28 | void __init plat_mem_setup(void) |
| 29 | { |
Paul Burton | b6d5e47 | 2016-08-26 15:17:34 +0100 | [diff] [blame] | 30 | void *fdt = plat_get_fdt(); |
| 31 | |
Paul Burton | b6d5e47 | 2016-08-26 15:17:34 +0100 | [diff] [blame] | 32 | fdt = sead3_dt_shim(fdt); |
| 33 | __dt_setup_arch(fdt); |
Steven J. Hill | 9b73100 | 2013-01-17 11:37:03 -0600 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | void __init device_tree_init(void) |
| 37 | { |
Qais Yousef | 7e8a276 | 2013-12-06 11:00:45 +0000 | [diff] [blame] | 38 | unflatten_and_copy_device_tree(); |
Steven J. Hill | 3070033 | 2012-05-30 21:02:49 +0000 | [diff] [blame] | 39 | } |