summaryrefslogtreecommitdiff
path: root/common/spl
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-08-01 15:22:37 -0600
committerSimon Glass <sjg@chromium.org>2018-08-01 16:30:06 -0600
commit3ab9598df714556b649048b2a387071253e9e731 (patch)
tree55a61a2125ff40b15a96e47104402f06a91f5eb9 /common/spl
parent46d61a2f2aeefcd622c9678716429e68a3a98811 (diff)
binman: Rename 'position' to 'offset'
After some thought, I believe there is an unfortunate naming flaw in binman. Entries have a position and size, but now that we support hierarchical sections it is unclear whether a position should be an absolute position within the image, or a relative position within its parent section. At present 'position' actually means the relative position. This indicates a need for an 'image position' for code that wants to find the location of an entry without having to do calculations back through parents to discover this image position. A better name for the current 'position' or 'pos' is 'offset'. It is not always an absolute position, but it is always an offset from its parent offset. It is unfortunate to rename this concept now, 18 months after binman was introduced. However I believe it is the right thing to do. The impact is mostly limited to binman itself and a few changes to in-tree users to binman: tegra sunxi x86 The change makes old binman definitions (e.g. downstream or out-of-tree) incompatible if they use the 'pos = <...>' property. Later work will adjust binman to generate an error when it is used. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/spl')
-rw-r--r--common/spl/spl.c4
-rw-r--r--common/spl/spl_ram.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index a1e7b9fa91..b959aa0254 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -34,7 +34,7 @@ DECLARE_GLOBAL_DATA_PTR;
u32 *boot_params_ptr = NULL;
/* See spl.h for information about this */
-binman_sym_declare(ulong, u_boot_any, pos);
+binman_sym_declare(ulong, u_boot_any, offset);
/* Define board data structure */
static bd_t bdata __attribute__ ((section(".data")));
@@ -129,7 +129,7 @@ __weak void spl_board_prepare_for_boot(void)
void spl_set_header_raw_uboot(struct spl_image_info *spl_image)
{
- ulong u_boot_pos = binman_sym(ulong, u_boot_any, pos);
+ ulong u_boot_pos = binman_sym(ulong, u_boot_any, offset);
spl_image->size = CONFIG_SYS_MONITOR_LEN;
diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c
index e8701934b8..6000f495cc 100644
--- a/common/spl/spl_ram.c
+++ b/common/spl/spl_ram.c
@@ -49,7 +49,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
load.read = spl_ram_load_read;
spl_load_simple_fit(spl_image, &load, 0, header);
} else {
- ulong u_boot_pos = binman_sym(ulong, u_boot_any, pos);
+ ulong u_boot_pos = binman_sym(ulong, u_boot_any, offset);
debug("Legacy image\n");
/*