public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sinan Akman <sinan@writeme.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mpc837xerdb: "fix Calling __hwconfig without a buffer" warning
Date: Tue, 20 Jan 2015 20:47:01 -0500	[thread overview]
Message-ID: <1421804821-31830-1-git-send-email-sinan@writeme.com> (raw)

Signed-off-by: Sinan Akman <sinan@writeme.com>
---
 board/freescale/mpc837xerdb/mpc837xerdb.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c
index e0a1031..565f815 100644
--- a/board/freescale/mpc837xerdb/mpc837xerdb.c
+++ b/board/freescale/mpc837xerdb/mpc837xerdb.c
@@ -166,8 +166,13 @@ int board_early_init_f(void)
 int board_mmc_init(bd_t *bd)
 {
 	struct immap __iomem *im = (struct immap __iomem *)CONFIG_SYS_IMMR;
+	char buffer[HWCONFIG_BUFFER_SIZE] = {0};
+	int esdhc_hwconfig_enabled = 0;
 
-	if (!hwconfig("esdhc"))
+	if (getenv_f("hwconfig", buffer, sizeof(buffer)) > 0)
+		esdhc_hwconfig_enabled = hwconfig_f("esdhc", buffer);
+
+	if (esdhc_hwconfig_enabled == 0)
 		return 0;
 
 	clrsetbits_be32(&im->sysconf.sicrl, SICRL_USB_B, SICRL_USB_B_SD);
-- 
1.7.6.5

             reply	other threads:[~2015-01-21  1:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21  1:47 Sinan Akman [this message]
2015-03-02 20:11 ` [U-Boot] mpc837xerdb: "fix Calling __hwconfig without a buffer" warning Tom Rini
     [not found] <54D12214.1000706@writeme.com>
     [not found] ` <54D12A51.7050406@ti.com>
2015-02-03 20:24   ` [U-Boot] [PATCH] " Sinan Akman
2015-03-02 19:23     ` Sinan Akman

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=1421804821-31830-1-git-send-email-sinan@writeme.com \
    --to=sinan@writeme.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