summaryrefslogtreecommitdiffstats
path: root/commands/dfu.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-03-07 09:25:09 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-03-07 09:25:09 +0100
commita8a08f88cc8c2c78bcc421cd55144813b081bcec (patch)
tree67e818ea7ce5ab531251467e13fa3ec3e18e11c7 /commands/dfu.c
parent2331b1d8e8d7aabe52b4fd65ca200cf8288aec88 (diff)
parentd0343211a27b982c3ef61597b68a6bf76df887af (diff)
downloadbarebox-a8a08f88cc8c2c78bcc421cd55144813b081bcec.tar.gz
barebox-a8a08f88cc8c2c78bcc421cd55144813b081bcec.tar.xz
Merge branch 'for-next/misc'
Conflicts: common/environment.c
Diffstat (limited to 'commands/dfu.c')
-rw-r--r--commands/dfu.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/commands/dfu.c b/commands/dfu.c
index 99a381f18a..2513ed883b 100644
--- a/commands/dfu.c
+++ b/commands/dfu.c
@@ -128,9 +128,14 @@ static int do_dfu(int argc, char *argv[])
argstr = argv[optind];
- if (!idProduct || !idVendor) {
- printf("productid or vendorid not given\n");
- return 1;
+ if (!idProduct && !idVendor) {
+ idVendor = 0x1d50; /* Openmoko, Inc */
+ idProduct = 0x60a2; /* barebox bootloader USB DFU Mode */
+ }
+
+ if ((idProduct && !idVendor) || (!idProduct && idVendor)) {
+ printf("Only one of vendor id or product id given\n");
+ return -EINVAL;
}
for (n = 0; *argstr; n++) {