xref: /openbmc/u-boot/api/api_platform-mips.c (revision e99d7193)
1 /*
2  * (C) Copyright 2007 Stanislav Galabov <sgalabov@gmail.com>
3  *
4  * SPDX-License-Identifier:	GPL-2.0+
5  *
6  * This file contains routines that fetch data from bd_info sources
7  */
8 
9 #include <config.h>
10 #include <linux/types.h>
11 #include <api_public.h>
12 
13 #include <asm/u-boot.h>
14 #include <asm/global_data.h>
15 
16 #include "api_private.h"
17 
18 DECLARE_GLOBAL_DATA_PTR;
19 
20 /*
21  * Important notice: handling of individual fields MUST be kept in sync with
22  * include/asm-generic/u-boot.h, so any changes
23  * need to reflect their current state and layout of structures involved!
24  */
25 int platform_sys_info(struct sys_info *si)
26 {
27 
28 	platform_set_mr(si, gd->bd->bi_memstart,
29 			gd->bd->bi_memsize, MR_ATTR_DRAM);
30 
31 	return 1;
32 }
33