From patchwork Mon Aug 5 09:56:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ludovic BARRE X-Patchwork-Id: 11076415 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 69BB313A4 for ; Mon, 5 Aug 2019 09:57:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 538DA28821 for ; Mon, 5 Aug 2019 09:57:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 45E8828876; Mon, 5 Aug 2019 09:57:10 +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 9E67128821 for ; Mon, 5 Aug 2019 09:57:09 +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: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=Qzwudb0kRMhwzOIvTgRbdtSFGSbnX3RSgsaUQzmJSyY=; b=m92eGyK+w56fc6 XArdoG/9OkBsTrhsFvCLbBiL1oYIOgbKeeCjW8z5rXcEL86uLvAArDD51sJp/K2hkyZp+DcbP66nR FA3Hc4i6Xt6R++7PB59VOqX1gdgxTNyiAAxS8zbsJDZEzjpPQ91jn5CDvIxNZ+M80rEuXkzumrQ2y L7gw8wSeXfpMXyWL9iupOADACq1yAdclCemYae0ATDGbAD/t9S4vRVLWTywOw/Ca66gZrcGZSJImr sgpskgZi+UVy+Av1rCGFqlz6TP4SB72brkD9MtK7Z/yrr4Ukb6eLwB5TBaLE3jwV7re0R06POlGOe AVbKS1Dbm04sZkL/8s7w==; 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 1huZjp-0002e9-7V; Mon, 05 Aug 2019 09:57:09 +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 1huZjk-0002cp-Th for linux-arm-kernel@lists.infradead.org; Mon, 05 Aug 2019 09:57:06 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x758adt9030839; Mon, 5 Aug 2019 11:56:59 +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=zJZbElTZ8XMjuV/mB4+St0kC8YSwld+3sVm7VXWPPao=; b=E2A1quZkD9TpSlrqXOADLK8s3PoN6tFN6NOTwqqGx22ScNeuNMMy+vOhvRYwp0IkcleS Yc8vUNOro5KMpLW2yihSHCLZvoJOMuot+wFk5mMjEYgvoAktypMsbBt2sQhva6Ox20WT Zs026QYsv06i4RWKB+UHipEEOZYCOglmSqSqyeYLf8p+lLTyfLOkjnXSl5Oa7CHzOLYv +POMeOtpUjmG2CezYnAZ565DkIQ2U6ZeJd4N6E+BkfDssaO2e39HB80hVg7kaOrTGE4/ 7/YXpANlmlsQqDNTbIIrbcmGMgB7Ha3/VStGbed7xwsfuYkcaO9Eg4aGMxd4/WgQsRPJ 5Q== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2u5sd1du6q-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 05 Aug 2019 11:56:59 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C0EB738; Mon, 5 Aug 2019 09:56:58 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id A684E3023DC; Mon, 5 Aug 2019 11:56:58 +0200 (CEST) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 5 Aug 2019 11:56:58 +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; Mon, 5 Aug 2019 11:56:58 +0200 From: Ludovic Barre To: Ulf Hansson , Rob Herring Subject: [PATCH V4 0/3] mmc: mmci: add busy detect for stm32 sdmmc variant Date: Mon, 5 Aug 2019 11:56:23 +0200 Message-ID: <20190805095626.25998-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:, , definitions=2019-08-05_04:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190805_025705_454275_36867E34 X-CRM114-Status: GOOD ( 12.10 ) 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 X-Virus-Scanned: ClamAV using ClamSMTP 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 calback. 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 | 178 +++++++++++++++++----------- drivers/mmc/host/mmci.h | 7 +- drivers/mmc/host/mmci_stm32_sdmmc.c | 38 ++++++ 3 files changed, 151 insertions(+), 72 deletions(-)