rockchip: Remove ARCH= references from documentation
[oweals/u-boot.git] / cmd / fdt.c
index 10d8f3230bb009224b91d88722632e9b810598ed..99b1b5b3fcb94c44a8517d531c3ee47e019081b9 100644 (file)
--- a/cmd/fdt.c
+++ b/cmd/fdt.c
@@ -9,6 +9,8 @@
 
 #include <common.h>
 #include <command.h>
+#include <env.h>
+#include <image.h>
 #include <linux/ctype.h>
 #include <linux/types.h>
 #include <asm/global_data.h>
@@ -86,7 +88,7 @@ static const char * const fdt_member_table[] = {
        "size_dt_struct",
 };
 
-static int fdt_get_header_value(int argc, char * const argv[])
+static int fdt_get_header_value(int argc, char *const argv[])
 {
        fdt32_t *fdtp = (fdt32_t *)working_fdt;
        ulong val;
@@ -110,7 +112,7 @@ static int fdt_get_header_value(int argc, char * const argv[])
 /*
  * Flattened Device Tree command, see the help for parameter definitions.
  */
-static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_fdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
        if (argc < 2)
                return CMD_RET_USAGE;
@@ -285,7 +287,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        /*
         * Set the value of a property in the working_fdt.
         */
-       } else if (argv[1][0] == 's') {
+       } else if (strncmp(argv[1], "se", 2) == 0) {
                char *pathp;            /* path */
                char *prop;             /* property */
                int  nodeoffset;        /* node offset from libfdt */