]> git.baikalelectronics.ru Git - uboot.git/commit
spl: Convert spl_fit to work with sandbox
authorSimon Glass <sjg@chromium.org>
Mon, 8 Mar 2021 00:35:14 +0000 (17:35 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 12 Mar 2021 14:57:31 +0000 (09:57 -0500)
commit617ffea7e94e95e7b08ae46784f1218526a490a9
tree079c36b6f0998e3b494322f6840fa1f6c374f2f2
parent0f8c68fe6bf9a890dae8178a721807dd7393184b
spl: Convert spl_fit to work with sandbox

At present this casts addresses to pointers so cannot work with sandbox.
Update the code to use map_sysmem() instead.

As part of this change, the existing load_ptr is renamed to src_ptr since
it is not a pointer to load_addr. It is confusing to use a similar name
for something that is not actually related. For the alignment code,
ALIGN() is used instead of open-coded alignment. Add a comment to the line
that casts away a const.

Use a (new) load_ptr variable to access memory at address load_addr.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/spl/spl.c
common/spl/spl_fit.c