mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 2/4] scripts: imx-usb-loader: make debug output more useful
Date: Thu, 28 Apr 2016 16:16:27 +0200	[thread overview]
Message-ID: <1461852989-26399-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1461852989-26399-1-git-send-email-s.hauer@pengutronix.de>

- print write_memory message only in verbose mode, but in all
  cases when memory is written
- print more information about the DCD section just executed

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 scripts/imx/imx-usb-loader.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c
index f35a4c3..91151b8 100644
--- a/scripts/imx/imx-usb-loader.c
+++ b/scripts/imx/imx-usb-loader.c
@@ -506,6 +506,9 @@ static int write_memory(unsigned addr, unsigned val, int width)
 	write_reg_command[4] = (unsigned char)(addr >> 8);
 	write_reg_command[5] = (unsigned char)(addr);
 
+	if (verbose > 1)
+		printf("write memory reg: 0x%08x val: 0x%08x width: %d\n", addr, val, width);
+
 	switch (width) {
 		case 1:
 			ds = 0x8;
@@ -683,7 +686,7 @@ static int write_dcd_table_ivt(struct imx_flash_header_v2 *hdr, unsigned char *f
 		unsigned s_length = (dcd[1] << 8) + dcd[2];
 		unsigned char *s_end = dcd + s_length;
 
-		printf("sub dcd length %x\n", s_length);
+		printf("command: 0x%02x sub dcd length: 0x%04x, flags: 0x%02x\n", dcd[0], s_length, dcd[3]);
 
 		if ((dcd[0] != 0xcc) || (dcd[3] != 0x04)) {
 			printf("Skipping unknown sub tag 0x%02x with len %04x\n", dcd[0], s_length);
@@ -1206,8 +1209,6 @@ cleanup:
 static int write_mem(struct config_data *data, uint32_t addr, uint32_t val, int width,
 		     int set_bits, int clear_bits)
 {
-	printf("wr 0x%08x 0x%08x\n", addr, val);
-
 	return write_memory(addr, val, width);
 }
 
-- 
2.8.0.rc3


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

  reply	other threads:[~2016-04-28 14:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28 14:16 [PATCH 1/4] scripts: imx: support set_bits/clear_bits Sascha Hauer
2016-04-28 14:16 ` Sascha Hauer [this message]
2016-04-28 14:16 ` [PATCH 3/4] scripts: imx-usb-loader: " Sascha Hauer
2016-04-28 14:16 ` [PATCH 4/4] ARM: i.MX: karo-tx6: Add support for the 2GiB i.MX6q+ board variant Sascha Hauer

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=1461852989-26399-2-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@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