Make this depend on whether the address matches the offset, rather than
a particular board build. For samus_tpl we don't need to copy, for
example.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
---

(no changes since v1)

 arch/x86/lib/spl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index 58fa572b71ae..335dacf47fd0 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -258,7 +258,7 @@ static int spl_board_load_image(struct spl_image_info 
*spl_image,
        spl_image->os = IH_OS_U_BOOT;
        spl_image->name = "U-Boot";
 
-       if (!IS_ENABLED(CONFIG_SYS_COREBOOT)) {
+       if (spl_image->load_addr != spl_get_image_pos()) {
                /* Copy U-Boot from ROM */
                memcpy((void *)spl_image->load_addr,
                       (void *)spl_get_image_pos(), spl_get_image_size());
-- 
2.42.0.283.g2d96d420d3-goog

Reply via email to