From patchwork Thu Sep 5 12:21:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ludovic BARRE X-Patchwork-Id: 11132993 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E95F51395 for ; Thu, 5 Sep 2019 12:23:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C62FF206A3 for ; Thu, 5 Sep 2019 12:23:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mjGdWwGu"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=st.com header.i=@st.com header.b="J5xdMWbz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C62FF206A3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=st.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=KQ6tPccsNs6RoW84ZG8jQxnLzzzFlFGz0Xr/lW7vBGA=; b=mjGdWwGuWy3gsC VeSreXz5s4ZoIvdd7pxs4IyfovzOvHS9FW2nyP+Ioa3jSpkrYnWi0Sd1kKaimizJv3XsIppT3xW43 3lfWUE4NwNtU5KRYmvQM4uAuMIAq1m+0+3bvTyBh3+FeKNGO5q0PptyEDKRyPtftE1Lzpgv+CzPGL LHGeoQny7pik2vIYSHBQnKErDZOl/idi9lyuJ3Dc8XRDNjVdT5hYZQkUXmQUTmJHIvXRGfHp/PFKq 73tLhcakO8bUxR7t7F4jA0LsGT/d67IC54Sm1FFIW29+9+M3tkkOvO/1GbW+RLESdAoCnej3S9w0J woggSR9IOVO7rzSNYM2Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i5qmv-0000LQ-OA; Thu, 05 Sep 2019 12:22:57 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i5qmE-00088m-Jv for linux-arm-kernel@lists.infradead.org; Thu, 05 Sep 2019 12:22:17 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x85CM7CR009310; Thu, 5 Sep 2019 14:22:10 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=CFc7V5XirXSeitPE35aKToc2Pe4j/3PUS9ILTMJMjb8=; b=J5xdMWbzdXsLGs+8QgJxl4949aVCBtI0VaFF9K1UybUOaNQUqcjnHceD4Y5PwT+s3pTF p9lvGaHny750VUu5JLo4hYYgoVsxw/aevHGYqj0dDJ6Y8RBIUyRQOh1kfc9GlrMkTTs5 kv+6GgPh4S4K0xSgeXiShAKbo3f/QRvWObOfOsA/NMHPIuqdVd4p5CKdXzvtXhVPYkQ6 XiL4uWFNpRVKD4s4qwI1OK0Fa3dh4pT2zk/WxlsYhy5eGSbmjPEvAjbNJUiT7jkuR17t Li4gp9O86TmEOQMVSNVbc2t2Ovou30VssSQ/WnP9AK5c4LBL9sSjgFcQ7S7jzn6Yubjl 4w== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx08-00178001.pphosted.com with ESMTP id 2uqe1a09eg-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 05 Sep 2019 14:22:10 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 34E3654; Thu, 5 Sep 2019 12:21:51 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id D28ED2CBDA8; Thu, 5 Sep 2019 14:21:49 +0200 (CEST) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS23.st.com (10.75.90.46) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 5 Sep 2019 14:21:49 +0200 Received: from lmecxl0923.lme.st.com (10.48.0.237) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 5 Sep 2019 14:21:49 +0200 From: Ludovic Barre To: Ulf Hansson , Rob Herring Subject: [PATCH V6 0/3] mmc: mmci: add busy detect for stm32 sdmmc variant Date: Thu, 5 Sep 2019 14:21:09 +0200 Message-ID: <20190905122112.29672-1-ludovic.Barre@st.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.48.0.237] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.70,1.0.8 definitions=2019-09-05_04:2019-09-04,2019-09-05 signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190905_052216_121041_39B86D60 X-CRM114-Status: GOOD ( 11.84 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [91.207.212.93 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Alexandre Torgue , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, srinivas.kandagatla@linaro.org, Ludovic Barre , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Ludovic Barre This patch series adds busy detect for stm32 sdmmc variant. Some adaptations are required: -On sdmmc the data timer is started on data transfert and busy state, so we must add hardware busy timeout support. -Add busy_complete callback at mmci_host_ops to allow to define a specific busy completion by variant. -Add sdmmc busy_complete callback. V6: -mmci_start_command: set datatimer only on rsp_busy flag (remove host->mrq->data). -move max_busy_timeout in set_ios callback. -typo fix: err_msk, clks on one lines. V5: -Replaces !cmd->data to !host->mrq->data to avoid overwrite of datatimer register by the first command (cmd23, without data) of SBC request. V4: -Re-work with busy_complete callback -In series, move "mmc: mmci: add hardware busy timeout feature" in first to simplify busy_complete prototype with err_msk parameter. V3: -rebase on latest mmc next -replace re-read by status parameter. V2: -mmci_cmd_irq cleanup in separate patch. -simplify the busy_detect_flag exclude -replace sdmmc specific comment in "mmc: mmci: avoid fake busy polling in mmci_irq" to focus on common behavior Ludovic Barre (3): mmc: mmci: add hardware busy timeout feature mmc: mmci: add busy_complete callback mmc: mmci: sdmmc: add busy_complete callback drivers/mmc/host/mmci.c | 183 +++++++++++++++++----------- drivers/mmc/host/mmci.h | 7 +- drivers/mmc/host/mmci_stm32_sdmmc.c | 38 ++++++ 3 files changed, 156 insertions(+), 72 deletions(-)