blob: 0f490c58fc8cbe81a963247d13826d0aeafd4217 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Wolfgang Denk1aaab002014-11-06 14:03:01 +01002/*
3 * (C) Copyright 2011
4 * Andreas Pretzsch, carpe noctem engineering, apr@cn-eng.de
Andreas Pretzsch7130a572011-07-16 05:51:00 +00005 */
6
7#include <common.h>
8#include <command.h>
Simon Glassea5427e2013-05-15 06:23:54 +00009#include <net.h>
Andreas Pretzsch7130a572011-07-16 05:51:00 +000010
Simon Glass09140112020-05-10 11:40:03 -060011static int do_fitupd(struct cmd_tbl *cmdtp, int flag, int argc,
12 char *const argv[])
Andreas Pretzsch7130a572011-07-16 05:51:00 +000013{
14 ulong addr = 0UL;
15
16 if (argc > 2)
Simon Glass4c12eeb2011-12-10 08:44:01 +000017 return CMD_RET_USAGE;
Andreas Pretzsch7130a572011-07-16 05:51:00 +000018
19 if (argc == 2)
20 addr = simple_strtoul(argv[1], NULL, 16);
21
Lukasz Majewskic7ff5522015-08-24 00:21:47 +020022 return update_tftp(addr, NULL, NULL);
Andreas Pretzsch7130a572011-07-16 05:51:00 +000023}
24
25U_BOOT_CMD(fitupd, 2, 0, do_fitupd,
26 "update from FIT image",
27 "[addr]\n"
28 "\t- run update from FIT image at addr\n"
29 "\t or from tftp 'updatefile'"
30);