mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
board_f: Add a new struct to hold pre-relocation info
Quite a few of the members of struct global_data are only used before reloction, or have little meaning afterwards, yet they hang around in struct global_data for the lifetime of U-Boot. This uses up precious pre-relocation SRAM on many boards. To help with this, start a new struct which exists only before relocation. Move new_fdt into this new struct. Drop the display of it in the 'bdinfo' command as it is probably not very useful. Note that the field does not exist in SPL builds. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#include <board_f.h>
|
||||
#include <cyclic.h>
|
||||
#include <event_internal.h>
|
||||
#include <fdtdec.h>
|
||||
@@ -42,6 +43,12 @@ struct global_data {
|
||||
* @bd: board information
|
||||
*/
|
||||
struct bd_info *bd;
|
||||
#ifndef CONFIG_SPL_BUILD
|
||||
/**
|
||||
* @boardf: information only used before relocation
|
||||
*/
|
||||
struct board_f *boardf;
|
||||
#endif
|
||||
/**
|
||||
* @flags: global data flags
|
||||
*
|
||||
@@ -219,10 +226,6 @@ struct global_data {
|
||||
* @fdt_blob: U-Boot's own device tree, NULL if none
|
||||
*/
|
||||
const void *fdt_blob;
|
||||
/**
|
||||
* @new_fdt: relocated device tree
|
||||
*/
|
||||
void *new_fdt;
|
||||
/**
|
||||
* @fdt_size: space reserved for relocated device space
|
||||
*/
|
||||
|
||||
23
include/board_f.h
Normal file
23
include/board_f.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright 2024 Google LLC
|
||||
* Written by: Simon Glass <sjg@chromeium.org>
|
||||
*/
|
||||
|
||||
#ifndef __BOARD_F
|
||||
#define __BOARD_F
|
||||
|
||||
/**
|
||||
* struct board_f: Information used only before relocation
|
||||
*
|
||||
* This struct is set up in board_init_f() and used to deal with relocation. It
|
||||
* is not available after relocation.
|
||||
*/
|
||||
struct board_f {
|
||||
/**
|
||||
* @new_fdt: relocated device tree
|
||||
*/
|
||||
void *new_fdt;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user