Received: by 10.223.185.116 with SMTP id b49csp1029954wrg; Wed, 21 Feb 2018 10:51:46 -0800 (PST) X-Google-Smtp-Source: AH8x225YHZRrz8i3shVZihwlyolMwsyeayE78GjfybRTEhbXz+mjohgV1vct0QojZvAJ3swLz8jq X-Received: by 10.99.94.67 with SMTP id s64mr3479986pgb.312.1519239106765; Wed, 21 Feb 2018 10:51:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519239106; cv=none; d=google.com; s=arc-20160816; b=ZF/3XBkJh12BUhB2Z6U0IgjCWlPmFwzd4hRsJ7W1/9QhEERfBHbwG0V3Ul0TIoDX1S N2AJ4smv4evWqK/sVZ3GH9Hwse6bZ3MH1er+pyxW6K5L7SBjafQ3I8a2hZ77KK4J54Xv i0knVkRvSN5MMUyJInt2+T7rm/9+mwEGBVqDlrqgM6+NswYFCPbAWDWNorK0O0AkyYUH t7gO4Rs2bIMfbKO3AYwsV/0hqzxr8E1KCmlhBtybhQHYgEfifc3o/Wa6bazxLh1kmpty BlNzPye0eYIPHS/BkNxvQ3/SWOg6VgdbIAG6knqV4KQAxxmd0CDwRPDoJ4iknNZAmU65 iZew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=gQB3ek5QFZRAgXrB2mCtXvyZ0D5vkWEPPxKgqVxuHgU=; b=w4DDtZulXUMjUv38sZFYRjWN8pmpUuiglYKxiW4cUqKIjLb7Z23byIA0853B5qSkg7 j9HaSF2oHcpy4m5mzaug06Ev53OH6Rl1xBA88I/sMpWX3xG4K3EETYqWXO1/bBCWOIKJ cvtKMK6DQ6H4EPALeUCvNJ3f/DPK+LdCO0TJ6pOulMQnWxb1ZBWop5KLiJNk8s8rSyWI krBxqshFIZZaLe2IlT4AF+maA2p55mm2mwTbpARzy8dIlZ54yXtfteGn0qcQsDdKNRv2 WIC+XAQkf9b2dCCDV3e0+R538pPLu+YbEkfpzMVotD9jnsfiUTogdKQ4xOw3uA5FAtpY IjCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q127si3766839pgq.309.2018.02.21.10.51.32; Wed, 21 Feb 2018 10:51:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937550AbeBUO0J (ORCPT + 99 others); Wed, 21 Feb 2018 09:26:09 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:35768 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934672AbeBUM53 (ORCPT ); Wed, 21 Feb 2018 07:57:29 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6D9D394F; Wed, 21 Feb 2018 12:57:28 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "yinbo.zhu" , Adrian Hunter , Ulf Hansson , Rasmus Villemoes Subject: [PATCH 4.9 76/77] mmc: sdhci-of-esdhc: fix eMMC couldnt work after kexec Date: Wed, 21 Feb 2018 13:49:25 +0100 Message-Id: <20180221124435.380851164@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124432.172390020@linuxfoundation.org> References: <20180221124432.172390020@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: yinbo.zhu commit 97618aca1440b5addc5c3d78659d3e176be23b80 upstream. The bit eSDHC_TBCTL[TB_EN] couldn't be reset by eSDHC_SYSCTL[RSTA] which is used to reset for all. The driver should make sure it's cleared before card initialization, otherwise the initialization would fail. Signed-off-by: yinbo.zhu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson Cc: Rasmus Villemoes Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/sdhci-of-esdhc.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -584,6 +584,10 @@ static void esdhc_init(struct platform_d pltfm_host = sdhci_priv(host); esdhc = sdhci_pltfm_priv(pltfm_host); + val = sdhci_readl(host, ESDHC_TBCTL); + val &= ~ESDHC_TB_EN; + sdhci_writel(host, val, ESDHC_TBCTL); + host_ver = sdhci_readw(host, SDHCI_HOST_VERSION); esdhc->vendor_ver = (host_ver & SDHCI_VENDOR_VER_MASK) >> SDHCI_VENDOR_VER_SHIFT;