From patchwork Wed May 8 16:40:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Branden X-Patchwork-Id: 10936251 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 84BD313AD for ; Wed, 8 May 2019 16:41:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FBE626E78 for ; Wed, 8 May 2019 16:41:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6493728947; Wed, 8 May 2019 16:41:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 07D82287FF for ; Wed, 8 May 2019 16:41:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=cu+ACo+1QrA+AoXjU/gVuNNnK4kSi/bk+gRvsU0F3sY=; b=HvsdWhVAp3S2pRp5tJy7IAD6N2 nbwz5OTcvWvhZGy6h2j4dXFgXWM/sFf01kIm49kahf9rhupJUp6jVVS4Trj1r6wQYHaoVOsy7eUKn Ik2CEYfCMy6n8Z1oavCdpzcpXFWNQGewgwgTT6ygka5+qq3PMirjieyrF3c5g3VD4YFuQp7dFtq+U h/X3z/TzlMOPsxtOciZ6+eTvZgDdThv5MDUYEP3Uihmo8yMPVbYsoS5ICGovGFuMgC2lQkR3UTMG0 XFc2ZldNozfiXRr5g7tAXRTJiEu+PrqQ4MT1QYX5qsFtmgWHVKxX2rejTJ4Kn266EI/i06FgHa/UW rQ0gKEvQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOPd0-0005Kr-U4; Wed, 08 May 2019 16:41:10 +0000 Received: from mail-yw1-xc44.google.com ([2607:f8b0:4864:20::c44]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOPcq-00057o-0P for linux-arm-kernel@lists.infradead.org; Wed, 08 May 2019 16:41:01 +0000 Received: by mail-yw1-xc44.google.com with SMTP id n188so16779172ywe.2 for ; Wed, 08 May 2019 09:40:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Xa6DtNP/MsKA3xKlWUlfMOa1BuQnbHXWgUsbk88eqkY=; b=GcFcfdz920X4hAX7aP+vIaiyEOWH4ow01gaSLiNFw/lkDgzf3WlT0694nzdDi/gyFN Fc8v+7pLhnyHv2+P+5XPjJnwYWdmqdr85JV9OFtuv496D5IUyQgG7lZpBoCeTxt53pw7 PXnXA/FoWK1dK4Mwg211m0vncobkAkEZctTw4= 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:in-reply-to :references; bh=Xa6DtNP/MsKA3xKlWUlfMOa1BuQnbHXWgUsbk88eqkY=; b=hR2O+4MeZuOKtX0ESIED+tgXDmyOYrBbrPlT0/fcGbnS0uFmRoxj9jrrpSFoqzDjEo zj3JhjoXuCF83WuotYtwEMFgucHuf1D4tteV9YVD5EoZOxEBuqDDOosSMTq28C/bbq7b uM8Pao8aHhhIi7SkIVbEQS54sn8bqSbO7Os6wmCZfGWoyeQHZmVtXI3F6cRoDFmQaMyy pRhuKqy4v0rxXggfgBDaora8eV+FVXnPgB02VtV642OT/wT7h7WkqXlKa0mB3IEAuUq7 TS2kggDMIOqNP6dQIASoAk6kjtq2vYbH5z7CYwjXWnbpyqFi7NNbp9osSylWpnP10fj1 eugA== X-Gm-Message-State: APjAAAXgHx1hKZtrSL6XyRaw6KVimvHp4V437HnItkUsbwXXUoBlWWmQ Dct77iqIcHXRcylwm4MfbPUJIQ== X-Google-Smtp-Source: APXvYqwwQ/ZXbeVOvDJBMAyLP+sfNNNFUcrgESJuSZJO2anvG8yUMgG4YKbZW8WAbZQhc+gylFARBQ== X-Received: by 2002:a81:2717:: with SMTP id n23mr12899509ywn.511.1557333658983; Wed, 08 May 2019 09:40:58 -0700 (PDT) Received: from lbrmn-lnxub113.broadcom.net ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id u6sm4671081ywl.71.2019.05.08.09.40.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2019 09:40:58 -0700 (PDT) From: Scott Branden To: Adrian Hunter , Ulf Hansson , Ray Jui , Scott Branden , Stefan Wahren Subject: [PATCH v2 1/2] mmc: sdhci-iproc: cygnus: Set NO_HISPD bit to fix HS50 data hold time problem Date: Wed, 8 May 2019 09:40:43 -0700 Message-Id: <20190508164044.22451-2-scott.branden@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190508164044.22451-1-scott.branden@broadcom.com> References: <20190508164044.22451-1-scott.branden@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190508_094100_046053_ADB6B845 X-CRM114-Status: GOOD ( 16.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Scott Branden , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Trac Hoang , BCM Kernel Feedback , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Trac Hoang The iproc host eMMC/SD controller hold time does not meet the specification in the HS50 mode. This problem can be mitigated by disabling the HISPD bit; thus forcing the controller output data to be driven on the falling clock edges rather than the rising clock edges. This change applies only to the Cygnus platform. Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Trac Hoang Signed-off-by: Scott Branden Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-iproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index 9d12c06c7fd6..9d4071c41c94 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -196,7 +196,8 @@ static const struct sdhci_ops sdhci_iproc_32only_ops = { }; static const struct sdhci_pltfm_data sdhci_iproc_cygnus_pltfm_data = { - .quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK, + .quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | + SDHCI_QUIRK_NO_HISPD_BIT, .quirks2 = SDHCI_QUIRK2_ACMD23_BROKEN | SDHCI_QUIRK2_HOST_OFF_CARD_ON, .ops = &sdhci_iproc_32only_ops, }; From patchwork Wed May 8 16:40:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Branden X-Patchwork-Id: 10936253 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3039A1515 for ; Wed, 8 May 2019 16:41:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1ECD7289EF for ; Wed, 8 May 2019 16:41:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1303128639; Wed, 8 May 2019 16:41:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B0A5F289EF for ; Wed, 8 May 2019 16:41:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=jEt6xgSn1Ic3OLzK2DANjM33SoTGb/o04uNCqW/wu08=; b=tJ5Y3N44TPy0OzWS8PgKqYXlWb iIwTW5HELrLdp2IY2HzFecQPbEvk4C3A9ICY0COEzuDcFsNonfTvkMOrSbAtz8viJsd8yLFDNshrZ t4j9nPgtvXOl+p4VAsiLHyXuU9LIl34sK21765OdZkog5Ao8mjpZlxNjpAjNU63FU9sLonvaDf2dM srunllvsVZew+OWjqr/21owOK8Xf9l6NrQdTLN5d7iiZK21N2ezw/aYMDDJmDT3IugD2s/w5BgOc8 h3lBDo5VrAMejP/f69WM94Lhx3XCotu215qL7xxl5V6vE1oeBagNjANuU6kJcYzlp/E6jMurjtm9z iker4wJA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOPd8-0005Vs-AL; Wed, 08 May 2019 16:41:18 +0000 Received: from mail-yw1-xc41.google.com ([2607:f8b0:4864:20::c41]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOPcs-00059G-IM for linux-arm-kernel@lists.infradead.org; Wed, 08 May 2019 16:41:06 +0000 Received: by mail-yw1-xc41.google.com with SMTP id n188so16779288ywe.2 for ; Wed, 08 May 2019 09:41:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pK0d0RZmUxDAg2UlpJZk6eqKP4c8MBzekwXBlQJcaEA=; b=YS5aDbbBHo/ZpqucQo4JmlEVicPBsSMyK91OtXe2V8t5TpyOfWVVDZcWLMQ/dv72Jf v62QeBR8G9/vH2qg+fbIYKlXx5sgCxG23YYKxDnUkXd6o3YISBsF+FfsL2MJqAoy1Qzy wBj+YvrFo99bgAxJ4s7iDmnOj9bnYrxt2dH3s= 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:in-reply-to :references; bh=pK0d0RZmUxDAg2UlpJZk6eqKP4c8MBzekwXBlQJcaEA=; b=ZB57Pw6ipQYQQl/w7SJGtTRn5Z8NrYtd2C5R+X+nHGNLT9nsQzEscfK6nVOP7Wa1Na Jfvb3mzjaapecH6QN+x2Q4b+nuSM3h4RLPXYUWlrQX+knFzstp1ptt4PVGgxAm6D6+6E uL+xMYKOAr7CpGy7WLskLi6DcdDlfpB3G/edPnMqFxL/PdhYnOA0wB6jGy2cfIIOGd5J y96Y9CCDMY21TJ8D7xu8GTD/6H4DphYGawvAbmIva2jP36KC3qp763G13J8r8B1Hc5G0 eQFZY/UeivMCeGFH7QTmGUPKE+WTsoCxblAVzcVChcz9hGNm91bnkNp7qrGibREJvige cOKA== X-Gm-Message-State: APjAAAXp2CKJrE1yMYsrb93SIKxcn1SUnq25m+COkKkEtf+srCqxaIBg EoRryax8wat1jyhPTwXEN8BJdw== X-Google-Smtp-Source: APXvYqz9ir/Gh8NUb1ycpQcDDVHcfdkyx6GifoD6MZrbq72G+zOHknduP6n8ZVhZZ9W94OE4VgRLcg== X-Received: by 2002:a25:4941:: with SMTP id w62mr27324493yba.360.1557333661480; Wed, 08 May 2019 09:41:01 -0700 (PDT) Received: from lbrmn-lnxub113.broadcom.net ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id u6sm4671081ywl.71.2019.05.08.09.40.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2019 09:41:00 -0700 (PDT) From: Scott Branden To: Adrian Hunter , Ulf Hansson , Ray Jui , Scott Branden , Stefan Wahren Subject: [PATCH v2 2/2] mmc: sdhci-iproc: Set NO_HISPD bit to fix HS50 data hold time problem Date: Wed, 8 May 2019 09:40:44 -0700 Message-Id: <20190508164044.22451-3-scott.branden@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190508164044.22451-1-scott.branden@broadcom.com> References: <20190508164044.22451-1-scott.branden@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190508_094102_846748_B5AA4E60 X-CRM114-Status: GOOD ( 16.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Scott Branden , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Trac Hoang , BCM Kernel Feedback , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Trac Hoang The iproc host eMMC/SD controller hold time does not meet the specification in the HS50 mode. This problem can be mitigated by disabling the HISPD bit; thus forcing the controller output data to be driven on the falling clock edges rather than the rising clock edges. Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Trac Hoang Signed-off-by: Scott Branden Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-iproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index 9d4071c41c94..2feb4ef32035 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -220,7 +220,8 @@ static const struct sdhci_iproc_data iproc_cygnus_data = { static const struct sdhci_pltfm_data sdhci_iproc_pltfm_data = { .quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | - SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12, + SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 | + SDHCI_QUIRK_NO_HISPD_BIT, .quirks2 = SDHCI_QUIRK2_ACMD23_BROKEN, .ops = &sdhci_iproc_ops, };