]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spl: Rename SPL_TPL_NAME and SPL_TPL_PROMPT
authorSimon Glass <sjg@chromium.org>
Mon, 30 Sep 2024 01:49:55 +0000 (19:49 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 11 Oct 2024 17:44:48 +0000 (11:44 -0600)
Rename these to use the word PHASE instead.

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

index 9748a3fb3e993b57206447bba99714efddb89b42..94657d00591f4a2725a8270aed6e62a50f7e943e 100644 (file)
@@ -97,9 +97,9 @@ __weak int dram_init_banksize(void)
 #if CONFIG_IS_ENABLED(OS_BOOT)
 __weak int spl_start_uboot(void)
 {
-       puts(SPL_TPL_PROMPT
+       puts(PHASE_PROMPT
             "Please implement spl_start_uboot() for your board\n");
-       puts(SPL_TPL_PROMPT "Direct Linux boot not active!\n");
+       puts(PHASE_PROMPT "Direct Linux boot not active!\n");
        return 1;
 }
 
@@ -140,13 +140,13 @@ void spl_fixup_fdt(void *fdt_blob)
        /* fixup the memory dt node */
        err = fdt_shrink_to_minimum(fdt_blob, 0);
        if (err == 0) {
-               printf(SPL_TPL_PROMPT "fdt_shrink_to_minimum err - %d\n", err);
+               printf(PHASE_PROMPT "fdt_shrink_to_minimum err - %d\n", err);
                return;
        }
 
        err = arch_fixup_fdt(fdt_blob);
        if (err) {
-               printf(SPL_TPL_PROMPT "arch_fixup_fdt err - %d\n", err);
+               printf(PHASE_PROMPT "arch_fixup_fdt err - %d\n", err);
                return;
        }
 #endif
@@ -330,7 +330,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
                        spl_image->load_addr = start;
                        spl_image->entry_point = start;
                        spl_image->size = size;
-                       debug(SPL_TPL_PROMPT
+                       debug(PHASE_PROMPT
                              "payload Image, load addr: 0x%lx size: %d\n",
                              spl_image->load_addr, spl_image->size);
                        return 0;
@@ -344,7 +344,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
                        spl_image->load_addr = CONFIG_SYS_LOAD_ADDR;
                        spl_image->entry_point = CONFIG_SYS_LOAD_ADDR;
                        spl_image->size = end - start;
-                       debug(SPL_TPL_PROMPT
+                       debug(PHASE_PROMPT
                              "payload zImage, load addr: 0x%lx size: %d\n",
                              spl_image->load_addr, spl_image->size);
                        return 0;
@@ -423,7 +423,7 @@ static int write_spl_handoff(void)
        ret = handoff_arch_save(ho);
        if (ret)
                return ret;
-       debug(SPL_TPL_PROMPT "Wrote SPL handoff\n");
+       debug(PHASE_PROMPT "Wrote SPL handoff\n");
 
        return 0;
 }
@@ -623,11 +623,11 @@ static int boot_from_devices(struct spl_image_info *spl_image,
                                        printf("Trying to boot from %s\n",
                                               spl_loader_name(loader));
                                else if (CONFIG_IS_ENABLED(SHOW_ERRORS)) {
-                                       printf(SPL_TPL_PROMPT
+                                       printf(PHASE_PROMPT
                                               "Unsupported Boot Device %d\n",
                                               bootdev);
                                } else {
-                                       puts(SPL_TPL_PROMPT
+                                       puts(PHASE_PROMPT
                                             "Unsupported Boot Device!\n");
                                }
                        }
@@ -673,7 +673,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
        struct spl_image_info spl_image;
        int ret, os;
 
-       debug(">>" SPL_TPL_PROMPT "board_init_r()\n");
+       debug(">>" PHASE_PROMPT "board_init_r()\n");
 
        spl_set_bd();
 
@@ -693,7 +693,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
                if (ret) {
                        debug("%s: Failed to set up bloblist: ret=%d\n",
                              __func__, ret);
-                       puts(SPL_TPL_PROMPT "Cannot set up bloblist\n");
+                       puts(PHASE_PROMPT "Cannot set up bloblist\n");
                        hang();
                }
        }
@@ -702,7 +702,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
 
                ret = setup_spl_handoff();
                if (ret) {
-                       puts(SPL_TPL_PROMPT "Cannot set up SPL handoff\n");
+                       puts(PHASE_PROMPT "Cannot set up SPL handoff\n");
                        hang();
                }
        }
@@ -723,7 +723,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
        if (CONFIG_IS_ENABLED(PCI) && !(gd->flags & GD_FLG_DM_DEAD)) {
                ret = pci_init();
                if (ret)
-                       puts(SPL_TPL_PROMPT "Cannot initialize PCI\n");
+                       puts(PHASE_PROMPT "Cannot initialize PCI\n");
                /* Don't fail. We still can try other boot methods. */
        }
 
@@ -750,10 +750,10 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
                                ARRAY_SIZE(spl_boot_list));
        if (ret) {
                if (CONFIG_IS_ENABLED(SHOW_ERRORS))
-                       printf(SPL_TPL_PROMPT "failed to boot from all boot devices (err=%d)\n",
+                       printf(PHASE_PROMPT "failed to boot from all boot devices (err=%d)\n",
                               ret);
                else
-                       puts(SPL_TPL_PROMPT "failed to boot from all boot devices\n");
+                       puts(PHASE_PROMPT "failed to boot from all boot devices\n");
                hang();
        }
 
@@ -807,13 +807,13 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
        if (CONFIG_IS_ENABLED(HANDOFF)) {
                ret = write_spl_handoff();
                if (ret)
-                       printf(SPL_TPL_PROMPT
+                       printf(PHASE_PROMPT
                               "SPL hand-off write failed (err=%d)\n", ret);
        }
        if (CONFIG_IS_ENABLED(UPL_OUT) && (gd->flags & GD_FLG_UPL)) {
                ret = spl_write_upl_handoff(&spl_image);
                if (ret) {
-                       printf(SPL_TPL_PROMPT
+                       printf(PHASE_PROMPT
                               "UPL hand-off write failed (err=%d)\n", ret);
                        hang();
                }
@@ -843,7 +843,7 @@ void preloader_console_init(void)
        gd->flags |= GD_FLG_HAVE_CONSOLE;
 
 #if CONFIG_IS_ENABLED(BANNER_PRINT)
-       puts("\nU-Boot " SPL_TPL_NAME " " PLAIN_VERSION " (" U_BOOT_DATE " - "
+       puts("\nU-Boot " PHASE_NAME " " PLAIN_VERSION " (" U_BOOT_DATE " - "
             U_BOOT_TIME " " U_BOOT_TZ ")\n");
 #endif
 #ifdef CONFIG_SPL_DISPLAY_PRINT
index 1ad5a69d807866a86a058e8d34992849d45c0438..3160f573bfbd49b089064086aef005800e1b14f7 100644 (file)
@@ -904,7 +904,7 @@ int spl_load_fit_image(struct spl_image_info *spl_image,
                spl_image->os = IH_OS_INVALID;
        spl_image->name = genimg_get_os_name(spl_image->os);
 
-       debug(SPL_TPL_PROMPT "payload image: %32s load addr: 0x%lx size: %d\n",
+       debug(PHASE_PROMPT "payload image: %32s load addr: 0x%lx size: %d\n",
              spl_image->name, spl_image->load_addr, spl_image->size);
 
 #ifdef CONFIG_SPL_FIT_SIGNATURE
index a77893455f256d5b485f692b9150f4cef1e18aaf..9252b3a3de0e8338ccbd5479624ef6715566817a 100644 (file)
@@ -71,7 +71,7 @@ int spl_parse_legacy_header(struct spl_image_info *spl_image,
 
        spl_image->os = image_get_os(header);
        spl_image->name = image_get_name(header);
-       debug(SPL_TPL_PROMPT
+       debug(PHASE_PROMPT
              "payload image: %32s load addr: 0x%lx size: %d\n",
              spl_image->name, spl_image->load_addr, spl_image->size);
 
index 3fc50cd919590f563bc15465b30152151333e5ab..269e36bb44175e5746b420da3ca9cca6128eed4e 100644 (file)
@@ -241,16 +241,16 @@ static inline const char *xpl_prefix(enum xpl_phase_t phase)
 /* A string name for SPL or TPL */
 #ifdef CONFIG_XPL_BUILD
 # ifdef CONFIG_TPL_BUILD
-#  define SPL_TPL_NAME "TPL"
+#  define PHASE_NAME   "TPL"
 # elif defined(CONFIG_VPL_BUILD)
-#  define SPL_TPL_NAME "VPL"
-# else
-#  define SPL_TPL_NAME "SPL"
+#  define PHASE_NAME   "VPL"
+# elif defined(CONFIG_SPL_BUILD)
+#  define PHASE_NAME   "SPL"
 # endif
-# define SPL_TPL_PROMPT        SPL_TPL_NAME ": "
+# define PHASE_PROMPT  PHASE_NAME ": "
 #else
-# define SPL_TPL_NAME  ""
-# define SPL_TPL_PROMPT        ""
+# define PHASE_NAME    ""
+# define PHASE_PROMPT  ""
 #endif
 
 /**