summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-09-17 12:25:09 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-09-19 07:44:37 +0200
commitf83a3e39f5dadd8ed6f115e3105377ee8dc7ce7c (patch)
tree140d0e6ddca3524bc29946156acd63edbadf23a9 /scripts
parent33bd1c4ef5abece868cfa3d28bffeb71f270f6cb (diff)
downloadbarebox-f83a3e39f5dadd8ed6f115e3105377ee8dc7ce7c.tar.gz
barebox-f83a3e39f5dadd8ed6f115e3105377ee8dc7ce7c.tar.xz
imx-usb-loader: Skip unknown tags
Instead of bailing out skip unknown tags. These tags are usually doing operations to poll for a certain register state. The correct solution is to implement this register polling, but for now delay execution for a while and assume the register has the correct state afterwards. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/imx/imx-usb-loader.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c
index 475917bc6c..c86260cdea 100644
--- a/scripts/imx/imx-usb-loader.c
+++ b/scripts/imx/imx-usb-loader.c
@@ -615,8 +615,10 @@ static int write_dcd_table_ivt(struct libusb_device_handle *h, struct usb_id *p_
printf("sub dcd length %x\n", s_length);
if ((dcd[0] != 0xcc) || (dcd[3] != 0x04)) {
- printf("Unknown sub tag\n");
- return -1;
+ printf("Skipping unknown sub tag 0x%02x with len %04x\n", dcd[0], s_length);
+ usleep(50000);
+ dcd += s_length;
+ continue;
}
dcd += 4;