summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSinan Akman <sinan@writeme.com>2015-01-20 20:47:01 -0500
committerTom Rini <trini@konsulko.com>2015-03-02 15:11:36 -0500
commit19e5118d1c4c9bd2dc9e52355774c8ea73839b5b (patch)
treea8c65e8ca77130850f72d891a0dde35e5e1edbc8
parent7547f78ce255de5ea7f6feae4e11ee1619f0b500 (diff)
downloadu-boot-imx-19e5118d1c4c9bd2dc9e52355774c8ea73839b5b.zip
u-boot-imx-19e5118d1c4c9bd2dc9e52355774c8ea73839b5b.tar.gz
u-boot-imx-19e5118d1c4c9bd2dc9e52355774c8ea73839b5b.tar.bz2
mpc837xerdb: "fix Calling __hwconfig without a buffer" warning
Signed-off-by: Sinan Akman <sinan@writeme.com>
-rw-r--r--board/freescale/mpc837xerdb/mpc837xerdb.c7
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);