* [PATCH 1/2] scripts: imx imx-usb-loader: Add support for i.MX6ull
@ 2017-09-26 7:23 Sascha Hauer
2017-09-26 7:23 ` [PATCH 2/2] scripts: imx imx-usb-loader: Fix last transfer error message Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2017-09-26 7:23 UTC (permalink / raw)
To: Barebox List
Same as other i.MX6 variants, just add the product id.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
scripts/imx/imx-usb-loader.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c
index 1119e61754..499e8c8ec6 100644
--- a/scripts/imx/imx-usb-loader.c
+++ b/scripts/imx/imx-usb-loader.c
@@ -171,6 +171,13 @@ static const struct mach_id imx_ids[] = {
.max_transfer = 1024,
}, {
.vid = 0x15a2,
+ .pid = 0x0080,
+ .name = "i.MX6ull",
+ .header_type = HDR_MX53,
+ .mode = MODE_HID,
+ .max_transfer = 1024,
+ }, {
+ .vid = 0x15a2,
.pid = 0x0076,
.name = "i.MX7S",
.header_type = HDR_MX53,
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] scripts: imx imx-usb-loader: Fix last transfer error message
2017-09-26 7:23 [PATCH 1/2] scripts: imx imx-usb-loader: Add support for i.MX6ull Sascha Hauer
@ 2017-09-26 7:23 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2017-09-26 7:23 UTC (permalink / raw)
To: Barebox List
When doing memory read transfers there will always be 64 bytes
transferred, even when less bytes are requested. This is expected
and there is a test skipping the error message in this case. The
test is wrong though since cnt is not decremented and will never
be equal to rem. Fix the test so that verifying memory does
not give a bogus error message.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
scripts/imx/imx-usb-loader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c
index 499e8c8ec6..6052343e00 100644
--- a/scripts/imx/imx-usb-loader.c
+++ b/scripts/imx/imx-usb-loader.c
@@ -635,7 +635,7 @@ static int read_memory(unsigned addr, void *dest, unsigned cnt)
break;
}
if ((last_trans > rem) || (last_trans > 64)) {
- if ((last_trans == 64) && (cnt == rem)) {
+ if ((last_trans == 64) && (rem < 64)) {
/* Last transfer is expected to be too large for HID */
} else {
printf("err: %02x %02x %02x %02x cnt=%u rem=%d last_trans=%i\n",
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-26 7:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-26 7:23 [PATCH 1/2] scripts: imx imx-usb-loader: Add support for i.MX6ull Sascha Hauer
2017-09-26 7:23 ` [PATCH 2/2] scripts: imx imx-usb-loader: Fix last transfer error message Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox