public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] mpc8xxx: improve LAW error messages when setting up DDR
Date: Wed,  7 Oct 2009 16:34:28 -0400	[thread overview]
Message-ID: <1254947668-11286-1-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <4ACC9A83.1020707@windriver.com>

When setting up the LAWs for the DDR, if there was an error,
you got the not-so-helpful error text "ERROR" and nothing
else.  Not only is it non-informative, but it is also
pretty frustrating trying to grep for "ERROR" in the source.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---

v2: sync ctrl #'s; use __func__ as per Peter's comments.

 cpu/mpc8xxx/ddr/util.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/cpu/mpc8xxx/ddr/util.c b/cpu/mpc8xxx/ddr/util.c
index 4451989..1e2d921 100644
--- a/cpu/mpc8xxx/ddr/util.c
+++ b/cpu/mpc8xxx/ddr/util.c
@@ -89,17 +89,18 @@ __fsl_ddr_set_lawbar(const common_timing_params_t *memctl_common_params,
 			? LAW_TRGT_IF_DDR_INTRLV : LAW_TRGT_IF_DDR_1;
 
 		if (set_ddr_laws(base, size, lawbar1_target_id) < 0) {
-			printf("ERROR\n");
+			printf("%s: ERROR (ctrl #0, intrlv=%d)\n", __func__,
+				memctl_interleaved);
 			return ;
 		}
 	} else if (ctrl_num == 1) {
 		if (set_ddr_laws(base, size, LAW_TRGT_IF_DDR_2) < 0) {
-			printf("ERROR\n");
+			printf("%s: ERROR (ctrl #1)\n", __func__);
 			return ;
 		}
 	} else {
-		printf("unexpected controller number %u in %s\n",
-			ctrl_num, __FUNCTION__);
+		printf("%s: unexpected DDR controller number (%u)\n", __func__,
+			ctrl_num);
 	}
 }
 
-- 
1.6.5.rc1

  reply	other threads:[~2009-10-07 20:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-06 23:44 [U-Boot] [PATCH] mpc8xxx: improve LAW error messages when setting up DDR Paul Gortmaker
2009-10-07  0:24 ` Peter Tyser
2009-10-07 13:41   ` Paul Gortmaker
2009-10-07 20:34     ` Paul Gortmaker [this message]
2009-10-08  3:28       ` [U-Boot] [PATCH v2] " Kumar Gala

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=1254947668-11286-1-git-send-email-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=u-boot@lists.denx.de \
    /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