Received: by 10.223.176.5 with SMTP id f5csp3415035wra; Mon, 29 Jan 2018 12:51:05 -0800 (PST) X-Google-Smtp-Source: AH8x227NTJxYn+PtijplxpfFTXhInkybreOkNQPCBkvCZyPOwmennDKu5N0B+QYarQrW8YAvL2xc X-Received: by 10.98.219.129 with SMTP id f123mr28344049pfg.51.1517259065620; Mon, 29 Jan 2018 12:51:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517259065; cv=none; d=google.com; s=arc-20160816; b=DSlfuAuZ/2vN2Cf0TkwC5vtnzAYuDQwIUb0ylf+E8B3mWbgDY/3Xo8eJO0QJ9lES3h K/WSlPzzXXL6xVx0ECZbgGw8zJugeWjGpGdXN3BN27DsgvUzPrDoonOsiYwFgNmU0X04 6yEhOyhXS4TGCSUTGSxjuj8Efflhql59sO+9+3u4T1l2q6ICino8glMmc52H91/m0RIh KBCEXtUsFpdcyU8FCNnLYQv3CcsDDOdCp2EUBKcIVW6YHjgHVU61+WqRVaZjdU1rGdmZ PXwFcSSfqIVvShnEbK2+k/Q5GNTQGlofD520Os8O1qxyUjgd5kKNy8HC88IsoBqLy+tk t1ww== 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=+qhWj3ImF9UHB6tV0mIgaA2BDWhbpORIaaTPbBLmhWs=; b=Vv5pm7Df1rQilyr/Zjo6isBj8Eqz2EtFmhscutrLWsg5FFf+eL5h5YCFo7Zzdxmz0I bS9vBeteqN4TeGvM+g4yKAJwrq4DKLom0xpJrDLFRKz5z8jBvo5/e1C4oWybtjmozrZB zOB70JhA9zO8ysLdHMUqKoenmhx77tSKmHWHqEiEt+xEaCh3OiTQx5Fr70CtgwRfT+Qn E4UjMr+pLGlAmcx90RiP9Dx63mJjOSjG5ab1g5OeDo85yqKep+AQv3XSFJV1G54zC/Gi GOr+yDhAyoSv9++yTkRUB5njeyLW8uMjwtS1SCJdYE00cVQZGknKWZn2G5efxPeuR+kf 0sTw== 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 q7si4240954pfh.74.2018.01.29.12.50.50; Mon, 29 Jan 2018 12:51:05 -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 S1753711AbeA2ULd (ORCPT + 99 others); Mon, 29 Jan 2018 15:11:33 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:60450 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753676AbeA2UL1 (ORCPT ); Mon, 29 Jan 2018 15:11:27 -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 859012F28; Mon, 29 Jan 2018 13:02:54 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yangbo Lu , Ulf Hansson , Matthias Brugger Subject: [PATCH 4.4 19/74] mmc: sdhci-of-esdhc: add/remove some quirks according to vendor version Date: Mon, 29 Jan 2018 13:56:24 +0100 Message-Id: <20180129123848.480368327@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180129123847.507563674@linuxfoundation.org> References: <20180129123847.507563674@linuxfoundation.org> User-Agent: quilt/0.65 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.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: yangbo lu commit 1ef5e49e46b919052474d9b54a15debc79ff0133 upstream. A previous patch had removed esdhc_of_platform_init() by mistake. static void esdhc_of_platform_init(struct sdhci_host *host) { u32 vvn; vvn = in_be32(host->ioaddr + SDHCI_SLOT_INT_STATUS); vvn = (vvn & SDHCI_VENDOR_VER_MASK) >> SDHCI_VENDOR_VER_SHIFT; if (vvn == VENDOR_V_22) host->quirks2 |= SDHCI_QUIRK2_HOST_NO_CMD23; if (vvn > VENDOR_V_22) host->quirks &= ~SDHCI_QUIRK_NO_BUSY_IRQ; } This patch is used to fix it by add/remove some quirks according to verdor version in probe. Signed-off-by: Yangbo Lu Fixes: f4932cfd22f1 ("mmc: sdhci-of-esdhc: support both BE and LE host controller") Signed-off-by: Ulf Hansson Signed-off-by: Matthias Brugger Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/sdhci-of-esdhc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -584,6 +584,8 @@ static int sdhci_esdhc_probe(struct plat { struct sdhci_host *host; struct device_node *np; + struct sdhci_pltfm_host *pltfm_host; + struct sdhci_esdhc *esdhc; int ret; np = pdev->dev.of_node; @@ -600,6 +602,14 @@ static int sdhci_esdhc_probe(struct plat sdhci_get_of_property(pdev); + pltfm_host = sdhci_priv(host); + esdhc = pltfm_host->priv; + if (esdhc->vendor_ver == VENDOR_V_22) + host->quirks2 |= SDHCI_QUIRK2_HOST_NO_CMD23; + + if (esdhc->vendor_ver > VENDOR_V_22) + host->quirks &= ~SDHCI_QUIRK_NO_BUSY_IRQ; + if (of_device_is_compatible(np, "fsl,p5040-esdhc") || of_device_is_compatible(np, "fsl,p5020-esdhc") || of_device_is_compatible(np, "fsl,p4080-esdhc") ||