From patchwork Thu May 9 17:24:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Branden X-Patchwork-Id: 10937423 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 765CA924 for ; Thu, 9 May 2019 17:24:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 592A428AF3 for ; Thu, 9 May 2019 17:24:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B8A328AF9; Thu, 9 May 2019 17:24:51 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E192628AF3 for ; Thu, 9 May 2019 17:24:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726764AbfEIRYj (ORCPT ); Thu, 9 May 2019 13:24:39 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:37569 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726576AbfEIRYi (ORCPT ); Thu, 9 May 2019 13:24:38 -0400 Received: by mail-pg1-f194.google.com with SMTP id e6so1548218pgc.4 for ; Thu, 09 May 2019 10:24:37 -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=cPBzyUAV50pAnZfXXI85W0FJrR1AmwGO+3Mm+J5Ler8=; b=KZymrmgNoadDcCwAw9QgPOqaSR0OLrD5V49mAh1uQt0GgJ3kfSscqL6ofV06PDPlwW 7JIc+kGuIJRjIpOrvb6N2dADvTRctPUm5ttHOPJ1QG1d5TZIv7631WzfeC7gBsCMTlN1 fbPaM6gs/seQ3JgTCfuCXd2U0Uj505rmkAGeo= 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=cPBzyUAV50pAnZfXXI85W0FJrR1AmwGO+3Mm+J5Ler8=; b=F8Dq5S7s1Jr4EaGYdMzxhYDK7XoPtyK+vtF7mBNj9TMIAYk1c9iMlvC3xxoADY/JeH 1O2I/CEk+DVRhEBnoTNeJV6d7HcLFZPdcphb8DGtZ6SZi9175kZvxyVNgMA6B+ybVAMB KtFp5AjZjjSMg8cLAY1IX4y9tfyZldwKO1lZ5EyWlseAkx0BUWxU/khJF4TGGrqWQ8q2 tFCAl30xJC/4Zgurdvkdi6bwiSmMgAqE9+5baOzpGBaePeQO7JQrZ/82RA9xrapE+uxK bNElltDNAsD+PXamTtjJ4LTJJ5V7a4wI+8SLE+6JgxNgZz8HwgawkvOmxiXOTMijoI// pU2w== X-Gm-Message-State: APjAAAVPeXeExJQZtdwADj6WU5N+84AerLXk0kpaDacAypgQjYTCKEch eaLtIeLdp64Kf4IoRz4Rxw9TiA== X-Google-Smtp-Source: APXvYqwltYnMRdytoyt+Gakgvt9eaNw+HtE2WFlXBJvXLOllj4Xdxq3+5a4BOoOCJ7GUUv5cjQ6L4w== X-Received: by 2002:a62:3892:: with SMTP id f140mr6877728pfa.128.1557422677403; Thu, 09 May 2019 10:24:37 -0700 (PDT) Received: from lbrmn-lnxub113.broadcom.net ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id m8sm3989699pgn.59.2019.05.09.10.24.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 10:24:36 -0700 (PDT) From: Scott Branden To: Adrian Hunter , Ulf Hansson , Ray Jui , Scott Branden , Stefan Wahren Cc: BCM Kernel Feedback , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Trac Hoang , stable@vger.kernel.org, Scott Branden Subject: [PATCH v3 1/2] mmc: sdhci-iproc: cygnus: Set NO_HISPD bit to fix HS50 data hold time problem Date: Thu, 9 May 2019 10:24:26 -0700 Message-Id: <20190509172427.17835-2-scott.branden@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190509172427.17835-1-scott.branden@broadcom.com> References: <20190509172427.17835-1-scott.branden@broadcom.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.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. Stable tag (v4.12+) chosen to assist stable kernel maintainers so that the change does not produce merge conflicts backporting to older kernel versions. In reality, the timing bug existed since the driver was first introduced but there is no need for this driver to be supported in kernel versions that old. 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 Thu May 9 17:24:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Branden X-Patchwork-Id: 10937421 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 8E35F924 for ; Thu, 9 May 2019 17:24:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7208928AF3 for ; Thu, 9 May 2019 17:24:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6623628AF9; Thu, 9 May 2019 17:24:45 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 060F928AF3 for ; Thu, 9 May 2019 17:24:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726824AbfEIRYo (ORCPT ); Thu, 9 May 2019 13:24:44 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:43817 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726809AbfEIRYk (ORCPT ); Thu, 9 May 2019 13:24:40 -0400 Received: by mail-pg1-f195.google.com with SMTP id t22so1536511pgi.10 for ; Thu, 09 May 2019 10:24:40 -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=Wx8gaoHC5MOYV389XtnYNdY7stPe/BwS11WRGJ3X0jU=; b=NLbenTRuAo/KwttyYdSfiYeHTl8s02uccdxHkJwJLM2aY7TwvWQqlzRs0z8yANQP8R khMAKyxuFZJpgqgeNYGcHLqu5JE1xjX9RHiBh3YBz9oyDSgkjkxUuCIXX01cR7/10nQI rodbcT1oFhD5khMY98DrmTSlWUYOKTkyTYnlE= 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=Wx8gaoHC5MOYV389XtnYNdY7stPe/BwS11WRGJ3X0jU=; b=VQ+UzcyoyFDwM2xCt0POgEwUBOz7bFpNjzMd6wUgaPla/kasAPYcXdjWgN1/yqva5h KsVICRbHY3A6MZoR4kV0GvtLqj+Wqy6+VcVP3s1p05OTa2etPh87Nns3GT75BdGHdJxt 3AXmTWzyv5PJNm+92XShG7mOZAlQrIe1YTBXZCZ+rbCU1Yu1ElvwaKyynype2h/BnXe/ +tabzGq5EBFYs38cn7LaUrlIP5evKSR84g5bx6PZdtajUqechSClH0ZHkvrkewgqLwjw nQEXaMOnkjNo1aP0kjpsHXP4/kdcSNUJHaxoPvDJ1gR6G9ZF6Ze3h/n6tL4Gi8YNGqHv kqkw== X-Gm-Message-State: APjAAAXkOYqgiVZtqnkcP8wabIvbQfEpxJqvDD6aSeIZNnAwzBYF836q wzzcHQGYOj8JLRkMxc97QKleIQ== X-Google-Smtp-Source: APXvYqwYqy8L9x/EoYgEU/4wY9WEr7lylwmLPU9640H1GKytWxa+mGBeQ/ZgM4Ryo2yw8qrfa7yERw== X-Received: by 2002:aa7:9116:: with SMTP id 22mr6898551pfh.165.1557422679753; Thu, 09 May 2019 10:24:39 -0700 (PDT) Received: from lbrmn-lnxub113.broadcom.net ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id m8sm3989699pgn.59.2019.05.09.10.24.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 10:24:39 -0700 (PDT) From: Scott Branden To: Adrian Hunter , Ulf Hansson , Ray Jui , Scott Branden , Stefan Wahren Cc: BCM Kernel Feedback , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Trac Hoang , stable@vger.kernel.org, Scott Branden Subject: [PATCH v3 2/2] mmc: sdhci-iproc: Set NO_HISPD bit to fix HS50 data hold time problem Date: Thu, 9 May 2019 10:24:27 -0700 Message-Id: <20190509172427.17835-3-scott.branden@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190509172427.17835-1-scott.branden@broadcom.com> References: <20190509172427.17835-1-scott.branden@broadcom.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.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. Stable tag (v4.12+) chosen to assist stable kernel maintainers so that the change does not produce merge conflicts backporting to older kernel versions. In reality, the timing bug existed since the driver was first introduced but there is no need for this driver to be supported in kernel versions that old. 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, };