From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00C21C3A5A5 for ; Thu, 5 Sep 2019 12:22:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CA3A92145D for ; Thu, 5 Sep 2019 12:22:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=st.com header.i=@st.com header.b="J5xdMWbz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389355AbfIEMWW (ORCPT ); Thu, 5 Sep 2019 08:22:22 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:29330 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726498AbfIEMWV (ORCPT ); Thu, 5 Sep 2019 08:22:21 -0400 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 CC: , Maxime Coquelin , Alexandre Torgue , , , , , , Ludovic Barre 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 Content-Type: text/plain 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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(-) -- 2.17.1