blob: c915e54f10acef1de7cf76da1634ec5e3464347e [file] [log] [blame]
Steven J. Hill30700332012-05-30 21:02:49 +00001/*
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 Yousef44327232013-12-06 11:00:42 +00007 * Copyright (C) 2013 Imagination Technologies Ltd.
Steven J. Hill30700332012-05-30 21:02:49 +00008 */
9#include <linux/init.h>
Qais Yousef44327232013-12-06 11:00:42 +000010#include <linux/libfdt.h>
Steven J. Hill9b731002013-01-17 11:37:03 -060011#include <linux/of_fdt.h>
Steven J. Hill9b731002013-01-17 11:37:03 -060012
Rob Herring089a49b2013-09-07 14:58:54 -050013#include <asm/prom.h>
14
Paul Burtonb6d5e472016-08-26 15:17:34 +010015#include <asm/mach-sead3/sead3-dtshim.h>
Steven J. Hill9b731002013-01-17 11:37:03 -060016#include <asm/mips-boards/generic.h>
Steven J. Hill30700332012-05-30 21:02:49 +000017
Steven J. Hill30700332012-05-30 21:02:49 +000018const char *get_system_type(void)
19{
20 return "MIPS SEAD3";
21}
22
Matt Redfearn5e7c1c92016-03-31 10:05:40 +010023void __init *plat_get_fdt(void)
24{
25 return (void *)__dtb_start;
26}
27
Steven J. Hill30700332012-05-30 21:02:49 +000028void __init plat_mem_setup(void)
29{
Paul Burtonb6d5e472016-08-26 15:17:34 +010030 void *fdt = plat_get_fdt();
31
Paul Burtonb6d5e472016-08-26 15:17:34 +010032 fdt = sead3_dt_shim(fdt);
33 __dt_setup_arch(fdt);
Steven J. Hill9b731002013-01-17 11:37:03 -060034}
35
36void __init device_tree_init(void)
37{
Qais Yousef7e8a2762013-12-06 11:00:45 +000038 unflatten_and_copy_device_tree();
Steven J. Hill30700332012-05-30 21:02:49 +000039}