]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - common/spl/spl_ext.c
part: Drop disk_partition_t typedef
[thirdparty/u-boot.git] / common / spl / spl_ext.c
index 559ba0b797126dc788ef243a67528771a90147d2..954133ba84e9841b2646810f19dfe275603895f4 100644 (file)
@@ -1,8 +1,7 @@
-/*
- * SPDX-License-Identifier:    GPL-2.0+
- */
+// SPDX-License-Identifier: GPL-2.0+
 
 #include <common.h>
+#include <env.h>
 #include <spl.h>
 #include <asm/u-boot.h>
 #include <ext4fs.h>
@@ -16,10 +15,9 @@ int spl_load_image_ext(struct spl_image_info *spl_image,
        s32 err;
        struct image_header *header;
        loff_t filelen, actlen;
-       disk_partition_t part_info = {};
+       struct disk_partition part_info = {};
 
-       header = (struct image_header *)(CONFIG_SYS_TEXT_BASE -
-                                               sizeof(struct image_header));
+       header = spl_get_load_buffer(-sizeof(*header), sizeof(*header));
 
        if (part_get_info(block_dev, partition, &part_info)) {
                printf("spl: no partition table found\n");
@@ -71,7 +69,7 @@ int spl_load_image_ext_os(struct spl_image_info *spl_image,
 {
        int err;
        __maybe_unused loff_t filelen, actlen;
-       disk_partition_t part_info = {};
+       struct disk_partition part_info = {};
        __maybe_unused char *file;
 
        if (part_get_info(block_dev, partition, &part_info)) {