doc: replace @return by Return:
[platform/kernel/u-boot.git] / common / autoboot.c
index 5bb2e19..b8861d5 100644 (file)
@@ -24,6 +24,7 @@
 #include <u-boot/sha256.h>
 #include <bootcount.h>
 #include <crypt.h>
+#include <dm/ofnode.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -68,7 +69,7 @@ static int menukey;
  * before starting to enter the password.
  *
  * @etime: Timeout value ticks (stop when get_ticks() reachs this)
- * @return 0 if autoboot should continue, 1 if it should stop
+ * Return: 0 if autoboot should continue, 1 if it should stop
  */
 static int passwd_abort_crypt(uint64_t etime)
 {
@@ -142,7 +143,7 @@ static int slow_equals(u8 *a, u8 *b, int len)
  * This checks for the user entering a SHA256 hash within a given time.
  *
  * @etime: Timeout value ticks (stop when get_ticks() reachs this)
- * @return 0 if autoboot should continue, 1 if it should stop
+ * Return: 0 if autoboot should continue, 1 if it should stop
  */
 static int passwd_abort_sha256(uint64_t etime)
 {
@@ -218,7 +219,7 @@ static int passwd_abort_sha256(uint64_t etime)
  * This checks for the user entering a string within a given time.
  *
  * @etime: Timeout value ticks (stop when get_ticks() reachs this)
- * @return 0 if autoboot should continue, 1 if it should stop
+ * Return: 0 if autoboot should continue, 1 if it should stop
  */
 static int passwd_abort_key(uint64_t etime)
 {
@@ -314,7 +315,7 @@ static void flush_stdin(void)
  * sha256-fallback has been enabled via the config setting
  * `AUTOBOOT_SHA256_FALLBACK`.
  *
- * @return `false` if we must not fall-back, `true` if plain sha256 should be tried
+ * Return: `false` if we must not fall-back, `true` if plain sha256 should be tried
  */
 static bool fallback_to_sha256(void)
 {
@@ -424,12 +425,12 @@ static void process_fdt_options(const void *blob)
        ulong addr;
 
        /* Add an env variable to point to a kernel payload, if available */
-       addr = fdtdec_get_config_int(gd->fdt_blob, "kernel-offset", 0);
+       addr = ofnode_conf_read_int("kernel-offset", 0);
        if (addr)
                env_set_addr("kernaddr", (void *)(CONFIG_SYS_TEXT_BASE + addr));
 
        /* Add an env variable to point to a root disk, if available */
-       addr = fdtdec_get_config_int(gd->fdt_blob, "rootdisk-offset", 0);
+       addr = ofnode_conf_read_int("rootdisk-offset", 0);
        if (addr)
                env_set_addr("rootaddr", (void *)(CONFIG_SYS_TEXT_BASE + addr));
 #endif /* CONFIG_SYS_TEXT_BASE */
@@ -446,8 +447,7 @@ const char *bootdelay_process(void)
        bootdelay = s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY;
 
        if (IS_ENABLED(CONFIG_OF_CONTROL))
-               bootdelay = fdtdec_get_config_int(gd->fdt_blob, "bootdelay",
-                                                 bootdelay);
+               bootdelay = ofnode_conf_read_int("bootdelay", bootdelay);
 
        debug("### main_loop entered: bootdelay=%d\n\n", bootdelay);