From patchwork Fri Feb 9 15:24:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Kiernan X-Patchwork-Id: 871459 X-Patchwork-Delegate: jh80.chung@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="t7/k8F6B"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zdJlX69qPz9s7f for ; Sat, 10 Feb 2018 02:24:55 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id E032EC21C93; Fri, 9 Feb 2018 15:24:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 0DEA8C21C93; Fri, 9 Feb 2018 15:24:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9D94BC21C93; Fri, 9 Feb 2018 15:24:44 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by lists.denx.de (Postfix) with ESMTPS id 3B805C21C2F for ; Fri, 9 Feb 2018 15:24:44 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id r71so16140380wmd.1 for ; Fri, 09 Feb 2018 07:24:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=RBESad9WDMWdJHE/jTOZhE2xDaUTlAKJlAMN+rbzfwc=; b=t7/k8F6BjX5sicknVZdq+MeXaemUmL2HQkxS4+b3iTUFMW5D2U9+8+sFRTLOtSZa11 kGK+T2OWRflUI+ldEkd+QYQkKMW4ixs4SmWeuTo4j0Jise2q3rqgCCR8+u8q4/0sIZIq T+PznL1W6UWpW0Wxi7NCTsSsPhBOT0evP5UVJDpVgaeMLt0UDy1bsOCYGx7CiIMJ2KCn ADowFwxwgoBmNznAKs94+Cuc1WqS0sW85z1ec2dlYe3bCe/OaGlVwEjF7LTmh7wu76HR vCpUwC9ih1FpQ6vsxSUiaHUqH1pg1m8waWGV3QioTUFSddcRcRzxAcyOqtyjtLECxjJu JEDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=RBESad9WDMWdJHE/jTOZhE2xDaUTlAKJlAMN+rbzfwc=; b=XlAR6VtUgrfjMbiSGOvUqHf5Rf/A7CWu6WMoXOAgQbhVt8RphnGWGIwSQWLrUvRX/j TGoHvUIpnx9IWepf6IzO9TKT4rZFDvIs+IV2fW1NEX9WZpJfMuldkXXYd0aNp+AEUAtD +e6Es2um3dR+pvp8wiDVkQIv/fp3LkOKBg6OzdrJioTIIBjoZgxms5bEEEk5mQKoVoJ2 YDi0sB7YXja5Oh8GjqXBRMg/HvQDQaL2akkUTgDfxCJ0FymMC0rm3E/7J0aKWtwfrXK0 ZmAK96DBOxSQphYqkYsC92SUysVJ08EPMGQ0hjrWxT3UKvQ/J7as9yfQ+iVNXVoPqo1g 6kdA== X-Gm-Message-State: APf1xPBFCinq5vToJnu2ogVqrc72ixdoiLEv2ytkg5C8LxRRonYU5/SF Hqx+x4AT87ZiNyb4USVQHkSh2Ry07tM= X-Google-Smtp-Source: AH8x226E6TqVoGdv2hTCpplKiYJD5vo0UCNyiiGBXZyl0JCwMzbR4dIVQZhvzmPBKxfelDRfCXrtWA== X-Received: by 10.28.122.11 with SMTP id v11mr2185847wmc.38.1518189883546; Fri, 09 Feb 2018 07:24:43 -0800 (PST) Received: from localhost.localdomain (193.164.125.18.ip.redstone-isp.net. [193.164.125.18]) by smtp.gmail.com with ESMTPSA id k7sm3210721wrg.68.2018.02.09.07.24.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Feb 2018 07:24:42 -0800 (PST) From: Alex Kiernan To: u-boot@lists.denx.de Date: Fri, 9 Feb 2018 15:24:38 +0000 Message-Id: <1518189878-14645-1-git-send-email-alex.kiernan@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [U-Boot] [PATCH] mmc: Fix uninitialised priv member X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" When using omap_hsmmc without the device model then the allocation of mmc->priv ends up uninitialised. Signed-off-by: Alex Kiernan Tested-by: Robert Nelson Reviewed-by: Sam Protsenko --- I've a board (AM335xx based) which boots fine with 2018-01, with 2018-03-rc1 (actually 1811a92) it fails in the MLO: U-Boot SPL 2018.03-rc1-00222-g128a503-dirty (Feb 09 2018 - 11:51:50 +0000) Trying to boot from MMC2 omap_hsmmc_send_cmd : DMA timeout: No status update mmc_init: -110, time 1026 spl: mmc init failed with error: -110 SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ### Bisecting it out, it's this commit: f0d53e8 mmc: omap_hsmmc: Add support for DMA (ADMA2) drivers/mmc/omap_hsmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index b12d6d9..c6b3f25 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -918,7 +918,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio, struct mmc_config *cfg; uint host_caps_val; - priv = malloc(sizeof(*priv)); + priv = calloc(1, sizeof(*priv)); if (priv == NULL) return -1;