spl: Weed out CONFIG_SYS_TEXT_BASE usage
[oweals/u-boot.git] / common / spl / spl_ram.c
index e594beaeaa3a5534b1188c4fdc3b14152b9d3724..619b39a537485f79fd3527ee243a2b312c5b3ab7 100644 (file)
@@ -63,8 +63,9 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
                         * No binman support or no information. For now, fix it
                         * to the address pointed to by U-Boot.
                         */
-                       u_boot_pos = CONFIG_SYS_TEXT_BASE -
-                                       sizeof(struct image_header);
+                       header = spl_get_load_buffer(-sizeof(*header),
+                                                    sizeof(*header));
+
                }
                header = (struct image_header *)map_sysmem(u_boot_pos, 0);