mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/4] imx-usb-loader: Skip unknown tags
Date: Wed, 17 Sep 2014 08:15:26 +0200	[thread overview]
Message-ID: <1410934529-20576-1-git-send-email-s.trumtrar@pengutronix.de> (raw)

From: Sascha Hauer <s.hauer@pengutronix.de>

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>
---
 scripts/imx/imx-usb-loader.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c
index 475917bc6c31..c86260cdea3f 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;
 
-- 
2.1.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2014-09-17  6:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17  6:15 Steffen Trumtrar [this message]
2014-09-17  6:15 ` [PATCH 2/4] imx-image: Handle check commands correctly Steffen Trumtrar
2014-09-17  6:15 ` [PATCH 3/4] arm: mach-imx: add more ddr register defines Steffen Trumtrar
2014-09-17  6:15 ` [PATCH 4/4] ARM: i.MX6: add support for Karo TX6X family Steffen Trumtrar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1410934529-20576-1-git-send-email-s.trumtrar@pengutronix.de \
    --to=s.trumtrar@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox