blob: 6cfd9e6cc20cd2f7d08d90fc550cdac4e25fa4ee [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Rafal Jaworowski500856e2008-01-09 19:39:36 +01002/*
3 * (C) Copyright 2007 Semihalf
4 *
5 * Written by: Rafal Jaworowski <raj@semihalf.com>
6 *
Rafal Jaworowski500856e2008-01-09 19:39:36 +01007 * This file contains routines that fetch data from ARM-dependent sources
8 * (bd_info etc.)
Rafal Jaworowski500856e2008-01-09 19:39:36 +01009 */
10
11#include <config.h>
Rafal Jaworowski500856e2008-01-09 19:39:36 +010012#include <linux/types.h>
13#include <api_public.h>
14
15#include <asm/u-boot.h>
16#include <asm/global_data.h>
17
18#include "api_private.h"
19
20DECLARE_GLOBAL_DATA_PTR;
21
22/*
23 * Important notice: handling of individual fields MUST be kept in sync with
24 * include/asm-arm/u-boot.h and include/asm-arm/global_data.h, so any changes
25 * need to reflect their current state and layout of structures involved!
26 */
27int platform_sys_info(struct sys_info *si)
28{
29 int i;
30
31 for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
32 platform_set_mr(si, gd->bd->bi_dram[i].start,
33 gd->bd->bi_dram[i].size, MR_ATTR_DRAM);
34
35 return 1;
36}