1*83d290c5STom Rini // SPDX-License-Identifier: GPL-2.0+ 27c604231SStanislav Galabov /* 37c604231SStanislav Galabov * (C) Copyright 2007 Stanislav Galabov <sgalabov@gmail.com> 47c604231SStanislav Galabov * 57c604231SStanislav Galabov * This file contains routines that fetch data from bd_info sources 67c604231SStanislav Galabov */ 77c604231SStanislav Galabov 87c604231SStanislav Galabov #include <config.h> 97c604231SStanislav Galabov #include <linux/types.h> 107c604231SStanislav Galabov #include <api_public.h> 117c604231SStanislav Galabov 127c604231SStanislav Galabov #include <asm/u-boot.h> 137c604231SStanislav Galabov #include <asm/global_data.h> 147c604231SStanislav Galabov 157c604231SStanislav Galabov #include "api_private.h" 167c604231SStanislav Galabov 177c604231SStanislav Galabov DECLARE_GLOBAL_DATA_PTR; 187c604231SStanislav Galabov 197c604231SStanislav Galabov /* 207c604231SStanislav Galabov * Important notice: handling of individual fields MUST be kept in sync with 217c604231SStanislav Galabov * include/asm-generic/u-boot.h, so any changes 227c604231SStanislav Galabov * need to reflect their current state and layout of structures involved! 237c604231SStanislav Galabov */ platform_sys_info(struct sys_info * si)247c604231SStanislav Galabovint platform_sys_info(struct sys_info *si) 257c604231SStanislav Galabov { 267c604231SStanislav Galabov 277c604231SStanislav Galabov platform_set_mr(si, gd->bd->bi_memstart, 287c604231SStanislav Galabov gd->bd->bi_memsize, MR_ATTR_DRAM); 297c604231SStanislav Galabov 307c604231SStanislav Galabov return 1; 317c604231SStanislav Galabov } 32