]> git.sur5r.net Git - u-boot/blobdiff - cmd/trace.c
sunxi: R40: add gigabit ethernet clocks
[u-boot] / cmd / trace.c
index 1a6d8c304746214689a6edbb5891593e6a6c82a3..26bf0960d49e3fff3b9005794769910841ac3f29 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (c) 2011 The Chromium OS Authors.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -16,10 +15,10 @@ static int get_args(int argc, char * const argv[], char **buff,
        if (argc < 2)
                return -1;
        if (argc < 4) {
-               *buff_size = getenv_ulong("profsize", 16, 0);
-               *buff = map_sysmem(getenv_ulong("profbase", 16, 0),
+               *buff_size = env_get_ulong("profsize", 16, 0);
+               *buff = map_sysmem(env_get_ulong("profbase", 16, 0),
                                   *buff_size);
-               *buff_ptr = getenv_ulong("profoffset", 16, 0);
+               *buff_ptr = env_get_ulong("profoffset", 16, 0);
        } else {
                *buff_size = simple_strtoul(argv[3], NULL, 16);
                *buff = map_sysmem(simple_strtoul(argv[2], NULL, 16),
@@ -46,9 +45,9 @@ static int create_func_list(int argc, char * const argv[])
        used = min(avail, (size_t)needed);
        printf("Function trace dumped to %08lx, size %#zx\n",
               (ulong)map_to_sysmem(buff + buff_ptr), used);
-       setenv_hex("profbase", map_to_sysmem(buff));
-       setenv_hex("profsize", buff_size);
-       setenv_hex("profoffset", buff_ptr + used);
+       env_set_hex("profbase", map_to_sysmem(buff));
+       env_set_hex("profsize", buff_size);
+       env_set_hex("profoffset", buff_ptr + used);
 
        return 0;
 }
@@ -71,9 +70,9 @@ static int create_call_list(int argc, char * const argv[])
        printf("Call list dumped to %08lx, size %#zx\n",
               (ulong)map_to_sysmem(buff + buff_ptr), used);
 
-       setenv_hex("profbase", map_to_sysmem(buff));
-       setenv_hex("profsize", buff_size);
-       setenv_hex("profoffset", buff_ptr + used);
+       env_set_hex("profbase", map_to_sysmem(buff));
+       env_set_hex("profsize", buff_size);
+       env_set_hex("profoffset", buff_ptr + used);
 
        return 0;
 }