From patchwork Wed Jul 25 12:10:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 10543917 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 20CF2184F for ; Wed, 25 Jul 2018 12:10:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EB2029D64 for ; Wed, 25 Jul 2018 12:10:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0258729D9F; Wed, 25 Jul 2018 12:10:41 +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=-7.9 required=2.0 tests=BAYES_00,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 96DCF29DAB for ; Wed, 25 Jul 2018 12:10:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728897AbeGYNWD (ORCPT ); Wed, 25 Jul 2018 09:22:03 -0400 Received: from bin-mail-out-06.binero.net ([195.74.38.229]:1683 "EHLO bin-mail-out-06.binero.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728863AbeGYNWD (ORCPT ); Wed, 25 Jul 2018 09:22:03 -0400 X-Halon-ID: bc2b4eb5-9003-11e8-ae9d-0050569116f7 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (unknown [89.233.230.99]) by bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA id bc2b4eb5-9003-11e8-ae9d-0050569116f7; Wed, 25 Jul 2018 14:10:35 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: Wolfram Sang , Ulf Hansson , linux-mmc@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Masaharu Hayakawa , =?utf-8?q?Niklas_S?= =?utf-8?q?=C3=B6derlund?= Subject: [PATCH 1/2] mmc: renesas_sdhi: skip SCC error check when retuning Date: Wed, 25 Jul 2018 14:10:30 +0200 Message-Id: <20180725121031.24277-2-niklas.soderlund+renesas@ragnatech.se> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180725121031.24277-1-niklas.soderlund+renesas@ragnatech.se> References: <20180725121031.24277-1-niklas.soderlund+renesas@ragnatech.se> MIME-Version: 1.0 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: Masaharu Hayakawa Checking for SCC error during retuning is unnecessary. Signed-off-by: Masaharu Hayakawa [Niklas: fix small style issue] Signed-off-by: Niklas Söderlund --- * Changes since v3 - Add check for 4TAP for HS400. * Changes since v2 - Added check for HS400 as it's now merged. - Added tags from Wolfram. --- drivers/mmc/host/renesas_sdhi_core.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c index 777e32b0e410e850..2e0d2eafd62ebecf 100644 --- a/drivers/mmc/host/renesas_sdhi_core.c +++ b/drivers/mmc/host/renesas_sdhi_core.c @@ -444,6 +444,15 @@ static bool renesas_sdhi_check_scc_error(struct tmio_mmc_host *host) { struct renesas_sdhi *priv = host_to_priv(host); + if (!(host->mmc->ios.timing == MMC_TIMING_UHS_SDR104) && + !(host->mmc->ios.timing == MMC_TIMING_MMC_HS200) && + !(host->mmc->ios.timing == MMC_TIMING_MMC_HS400 && + !(host->pdata->flags & TMIO_MMC_HAVE_4TAP_HS400))) + return false; + + if (host->mmc->doing_retune) + return false; + /* Check SCC error */ if (sd_scc_read32(host, priv, SH_MOBILE_SDHI_SCC_RVSCNTL) & SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN && From patchwork Wed Jul 25 12:10:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 10543919 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 BF7AA157A for ; Wed, 25 Jul 2018 12:10:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B010D29D94 for ; Wed, 25 Jul 2018 12:10:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE54E29D9C; Wed, 25 Jul 2018 12:10:42 +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=-7.9 required=2.0 tests=BAYES_00,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 6F57529D94 for ; Wed, 25 Jul 2018 12:10:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728901AbeGYNWE (ORCPT ); Wed, 25 Jul 2018 09:22:04 -0400 Received: from bin-mail-out-06.binero.net ([195.74.38.229]:47165 "EHLO bin-mail-out-06.binero.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728791AbeGYNWE (ORCPT ); Wed, 25 Jul 2018 09:22:04 -0400 X-Halon-ID: bcc1d093-9003-11e8-ae9d-0050569116f7 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (unknown [89.233.230.99]) by bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA id bcc1d093-9003-11e8-ae9d-0050569116f7; Wed, 25 Jul 2018 14:10:36 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: Wolfram Sang , Ulf Hansson , linux-mmc@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Masaharu Hayakawa , =?utf-8?q?Niklas_S?= =?utf-8?q?=C3=B6derlund?= Subject: [PATCH 2/2] mmc: tmio: Fix SCC error detection Date: Wed, 25 Jul 2018 14:10:31 +0200 Message-Id: <20180725121031.24277-3-niklas.soderlund+renesas@ragnatech.se> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180725121031.24277-1-niklas.soderlund+renesas@ragnatech.se> References: <20180725121031.24277-1-niklas.soderlund+renesas@ragnatech.se> MIME-Version: 1.0 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: Masaharu Hayakawa SDR104 and HS200 need to check for SCC error. If SCC error is detected, retuning is necessary. Signed-off-by: Masaharu Hayakawa [Niklas: update commit message] Signed-off-by: Niklas Söderlund --- drivers/mmc/host/tmio_mmc_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c index 72ac806e0c762d83..81883bc08524e441 100644 --- a/drivers/mmc/host/tmio_mmc_core.c +++ b/drivers/mmc/host/tmio_mmc_core.c @@ -920,8 +920,8 @@ static void tmio_mmc_finish_request(struct tmio_mmc_host *host) if (mrq->cmd->error || (mrq->data && mrq->data->error)) tmio_mmc_abort_dma(host); - if (host->check_scc_error) - host->check_scc_error(host); + if (host->check_scc_error && host->check_scc_error(host)) + mrq->cmd->error = -EILSEQ; /* If SET_BLOCK_COUNT, continue with main command */ if (host->mrq && !mrq->cmd->error) {