Heinrich Schuchardt | 63b5abc | 2024-11-23 09:47:51 +0100 | [diff] [blame^] | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | /* |
| 3 | * (C) Copyright 2007 Semihalf |
| 4 | * |
| 5 | * Written by: Rafal Jaworowski <raj@semihalf.com> |
| 6 | * |
| 7 | * This file contains a routine to fetch data from the global_data structure. |
| 8 | */ |
| 9 | |
| 10 | #include <api_public.h> |
| 11 | #include <asm/global_data.h> |
| 12 | #include "api_private.h" |
| 13 | |
| 14 | DECLARE_GLOBAL_DATA_PTR; |
| 15 | |
| 16 | int platform_sys_info(struct sys_info *si) |
| 17 | { |
| 18 | int i; |
| 19 | |
| 20 | for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) |
| 21 | platform_set_mr(si, gd->bd->bi_dram[i].start, |
| 22 | gd->bd->bi_dram[i].size, MR_ATTR_DRAM); |
| 23 | |
| 24 | return 1; |
| 25 | } |