]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
xpl: Rename spl_phase_prefix() and spl_phase_name()
authorSimon Glass <sjg@chromium.org>
Mon, 30 Sep 2024 01:49:40 +0000 (19:49 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 11 Oct 2024 17:44:47 +0000 (11:44 -0600)
Use simpler names for these functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sandbox/cpu/spl.c
arch/x86/lib/tpl.c
cmd/vbe.c
common/spl/spl.c
include/spl.h

index 71d785f4c3e3487f5c9178586c1f5fd05bd41642..c50df5f9179ecdcc07e0a8137a9c4572cc78f072 100644 (file)
@@ -27,8 +27,8 @@ int sandbox_find_next_phase(char *fname, int maxlen, bool use_img)
        const char *cur_prefix, *next_prefix;
        int ret;
 
-       cur_prefix = spl_phase_prefix(xpl_phase());
-       next_prefix = spl_phase_prefix(xpl_next_phase());
+       cur_prefix = xpl_prefix(xpl_phase());
+       next_prefix = xpl_prefix(xpl_next_phase());
        ret = os_find_u_boot(fname, maxlen, use_img, cur_prefix, next_prefix);
        if (ret)
                return log_msg_ret("find", ret);
index 0606b4a1c67dc1f5f4d5314b16609aba3f98bbb9..f7df7e03621e2fbd8cefc33245b0f40ff63343ef 100644 (file)
@@ -103,7 +103,7 @@ int spl_spi_load_image(void)
 
 void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
 {
-       debug("Jumping to %s at %lx\n", spl_phase_name(xpl_next_phase()),
+       debug("Jumping to %s at %lx\n", xpl_name(xpl_next_phase()),
              (ulong)spl_image->entry_point);
 #ifdef DEBUG
        print_buffer(spl_image->entry_point, (void *)spl_image->entry_point, 1,
index 423d9e5f8f09bdb17c90f5969a111d5a96bc0f56..186f6e6860d091b847cbddb4358d42bd46b76d51 100644 (file)
--- a/cmd/vbe.c
+++ b/cmd/vbe.c
@@ -93,7 +93,7 @@ static int do_vbe_state(struct cmd_tbl *cmdtp, int flag, int argc,
        printf("Phases:");
        for (i = PHASE_NONE; i < PHASE_COUNT; i++) {
                if (handoff->phases & (1 << i))
-                       printf(" %s", spl_phase_name(i));
+                       printf(" %s", xpl_name(i));
 
        }
        if (!handoff->phases)
index ad5c309348b21e8378501f9e384083e59b8f9140..9748a3fb3e993b57206447bba99714efddb89b42 100644 (file)
@@ -475,8 +475,7 @@ static int spl_common_init(bool setup_malloc)
                if (ret)
                        log_debug("Failed to unstash bootstage: ret=%d\n", ret);
        }
-       bootstage_mark_name(get_bootstage_id(true),
-                           spl_phase_name(xpl_phase()));
+       bootstage_mark_name(get_bootstage_id(true), xpl_name(xpl_phase()));
 #if CONFIG_IS_ENABLED(LOG)
        ret = log_init();
        if (ret) {
@@ -762,7 +761,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
 
        os = spl_image.os;
        if (os == IH_OS_U_BOOT) {
-               debug("Jumping to %s...\n", spl_phase_name(xpl_next_phase()));
+               debug("Jumping to %s...\n", xpl_name(xpl_next_phase()));
        } else if (CONFIG_IS_ENABLED(ATF) && os == IH_OS_ARM_TRUSTED_FIRMWARE) {
                debug("Jumping to U-Boot via ARM Trusted Firmware\n");
                spl_fixup_fdt(spl_image_fdt_addr(&spl_image));
index 50ffe4f79f9d7649aefabd47ed68f26ba0dcec44..b2978d8bbafe092b627615cb1f51466d29e81ccd 100644 (file)
@@ -194,11 +194,11 @@ static inline enum xpl_phase_t xpl_next_phase(void)
 }
 
 /**
- * spl_phase_name() - Get the name of the current phase
+ * xpl_name() - Get the name of a phase
  *
  * Return: phase name
  */
-static inline const char *spl_phase_name(enum xpl_phase_t phase)
+static inline const char *xpl_name(enum xpl_phase_t phase)
 {
        switch (phase) {
        case PHASE_TPL:
@@ -216,12 +216,12 @@ static inline const char *spl_phase_name(enum xpl_phase_t phase)
 }
 
 /**
- * spl_phase_prefix() - Get the prefix  of the current phase
+ * xpl_prefix() - Get the prefix  of the current phase
  *
  * @phase: Phase to look up
  * Return: phase prefix ("spl", "tpl", etc.)
  */
-static inline const char *spl_phase_prefix(enum xpl_phase_t phase)
+static inline const char *xpl_prefix(enum xpl_phase_t phase)
 {
        switch (phase) {
        case PHASE_TPL: