rockchip: Remove ARCH= references from documentation
[oweals/u-boot.git] / cmd / fitupd.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * (C) Copyright 2011
4  * Andreas Pretzsch, carpe noctem engineering, apr@cn-eng.de
5  */
6
7 #include <common.h>
8 #include <command.h>
9 #include <net.h>
10
11 #if !defined(CONFIG_UPDATE_TFTP)
12 #error "CONFIG_UPDATE_TFTP required"
13 #endif
14
15 static int do_fitupd(struct cmd_tbl *cmdtp, int flag, int argc,
16                      char *const argv[])
17 {
18         ulong addr = 0UL;
19
20         if (argc > 2)
21                 return CMD_RET_USAGE;
22
23         if (argc == 2)
24                 addr = simple_strtoul(argv[1], NULL, 16);
25
26         return update_tftp(addr, NULL, NULL);
27 }
28
29 U_BOOT_CMD(fitupd, 2, 0, do_fitupd,
30         "update from FIT image",
31         "[addr]\n"
32         "\t- run update from FIT image at addr\n"
33         "\t  or from tftp 'updatefile'"
34 );