From patchwork Wed Jan 21 01:47:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Akman X-Patchwork-Id: 431305 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id B3E5D140273 for ; Wed, 21 Jan 2015 13:18:23 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 686A04B61C; Wed, 21 Jan 2015 03:18:21 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jW0ZZoRM8DY4; Wed, 21 Jan 2015 03:18:21 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C552E4B60B; Wed, 21 Jan 2015 03:18:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6DAEE4B60B for ; Wed, 21 Jan 2015 03:18:16 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a6F4sBs-Crno for ; Wed, 21 Jan 2015 03:18:16 +0100 (CET) X-Greylist: delayed 1857 seconds by postgrey-1.32 at theia; Wed, 21 Jan 2015 03:18:13 CET X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from walmailout04.yourhostingaccount.com (mailout04.yourhostingaccount.com [65.254.254.66]) by theia.denx.de (Postfix) with ESMTP id 3DC394B600 for ; Wed, 21 Jan 2015 03:18:13 +0100 (CET) Received: from mailscan05.yourhostingaccount.com ([10.1.15.5] helo=walmailscan05.yourhostingaccount.com) by walmailout04.yourhostingaccount.com with esmtp (Exim) id 1YDkO4-0002Sj-4P for u-boot@lists.denx.de; Tue, 20 Jan 2015 20:47:16 -0500 Received: from [10.114.3.33] (helo=walimpout13) by walmailscan05.yourhostingaccount.com with esmtp (Exim) id 1YDkO3-0004S6-WA for u-boot@lists.denx.de; Tue, 20 Jan 2015 20:47:15 -0500 Received: from walauthsmtp07.yourhostingaccount.com ([10.1.18.7]) by walimpout13 with id iRnC1p003099A7601RnFGK; Tue, 20 Jan 2015 20:47:15 -0500 X-Authority-Analysis: v=2.1 cv=Sch5d5hu c=1 sm=1 tr=0 a=NZRI6lriG+l9ORc+caGMjA==:117 a=ns28KUO4p16oHgjZm1c2JA==:17 a=pq4jwCggAAAA:8 a=OF-CdTOGAAAA:8 a=lOhsKRwJS4QA:10 a=DDUcpTWQAAAA:8 a=YNv0rlydsVwA:10 a=VJNStu3FYY0cSpahJQUA:9 Received: from dslh161.ody.ca ([216.99.100.161]:40911 helo=blueblaze.no-domain-set.bellcanada) by walauthsmtp07.yourhostingaccount.com with esmtpa (Exim) id 1YDkO0-00016U-E8; Tue, 20 Jan 2015 20:47:12 -0500 From: Sinan Akman To: u-boot@lists.denx.de Date: Tue, 20 Jan 2015 20:47:01 -0500 Message-Id: <1421804821-31830-1-git-send-email-sinan@writeme.com> X-Mailer: git-send-email 1.7.6.5 X-EN-UserInfo: 9579962fb128fd4edc0e15f211ef4629:931c98230c6409dcc37fa7e93b490c27 X-EN-AuthUser: remote@bootbits.com X-EN-OrigIP: 216.99.100.161 X-EN-OrigHost: dslh161.ody.ca Cc: Sinan Akman , kim.phillips@freescale.com Subject: [U-Boot] [PATCH] mpc837xerdb: "fix Calling __hwconfig without a buffer" warning X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Sinan Akman --- 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);