mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] scripts: imx-usb-loader: enable DCD 16-bit write for hdr v1
@ 2016-08-21 20:18 Alexander Kurz
  2016-08-21 20:18 ` [PATCH 2/2] scripts: imx-usb-loader: structured DCD v1 element access Alexander Kurz
  2016-08-22  6:02 ` [PATCH 1/2] scripts: imx-usb-loader: enable DCD 16-bit write for hdr v1 Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Kurz @ 2016-08-21 20:18 UTC (permalink / raw)
  To: barebox; +Cc: Alexander Kurz

Do some cleanup which enables DCDv1 16 bit write access as side effect.

Signed-off-by: Alexander Kurz <akurz@blala.de>
---
 scripts/imx/imx-usb-loader.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c
index 1732497..9f25ca6 100644
--- a/scripts/imx/imx-usb-loader.c
+++ b/scripts/imx/imx-usb-loader.c
@@ -889,16 +889,11 @@ static int write_dcd_table_old(const struct imx_flash_header *hdr,
 
 		switch (type) {
 		case 1:
-			if (verbose > 1)
-				printf("type=%08x *0x%08x = 0x%08x\n", type, addr, val);
-			err = write_memory(addr, val, 1);
-			if (err < 0)
-				return err;
-			break;
+		case 2:
 		case 4:
 			if (verbose > 1)
 				printf("type=%08x *0x%08x = 0x%08x\n", type, addr, val);
-			err = write_memory(addr, val, 4);
+			err = write_memory(addr, val, type);
 			if (err < 0)
 				return err;
 			break;
-- 
2.1.4


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-22  6:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-21 20:18 [PATCH 1/2] scripts: imx-usb-loader: enable DCD 16-bit write for hdr v1 Alexander Kurz
2016-08-21 20:18 ` [PATCH 2/2] scripts: imx-usb-loader: structured DCD v1 element access Alexander Kurz
2016-08-22  6:02 ` [PATCH 1/2] scripts: imx-usb-loader: enable DCD 16-bit write for hdr v1 Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox