Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp809572ybl; Tue, 13 Aug 2019 03:01:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6c5zmoeV0zjmO3RDAO/mWssSf31moxjUwcWLhAaQEid+T+arwcciD2h0rKpHeAj5T1CMw X-Received: by 2002:a17:90a:ec07:: with SMTP id l7mr1429314pjy.39.1565690494956; Tue, 13 Aug 2019 03:01:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565690494; cv=none; d=google.com; s=arc-20160816; b=O5jdsBffyAhHvZVq8mtZ/O+m0T1RXVPxH2JJ90+Wq2fnRfnr174GhCaaYPky3vNndB NeHACRKpZrxNC3/SXn4ghxiPPR6mLk1ZjqrcCKEXxNsZHcQpqKdsQv+CfZ6vJhYI3DCB CdWEb8Yw1G5EUIgHPoIztqOxSCQQ52MOh3BAuYMgHVLF4SLp18HyAcAX7GfcYzSi3H0Z KyxqKeoXuZqdXLLSBkkkW+aP2d+El1xNSpaJ2Hm11C0iibSAo+A+C8WC72Wx648BoAkS Zug3B7YQAMyIRDJpQfB6MiBhEvevCVPjBKvWfsBSJNsHoj3Q1sqZNFv6kTodRFF/Y3i2 LQvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=aoyRokR5kzUkomjm7Ywbps3L0Afaxia9MCls/Ada1gA=; b=hkBL2Nm6MfwWLyeEnLojNPTD0g3TykUk1pj0MfnT4bvydJwSnC86zr7dn3UiLSx9E6 zGfO1duqwfXfOlam3YcM70Zs3OcCAzkPFzVePMBYGcOqD+aU4W1o3KBHRtaw+f5OxrIC 65IP8nSYgROX78J+ddvWGNovDDD+OnZZ/LiCCKVbBvqMQukSKrSQGZC+nJvdLF554QtK hAakuh1Zvr6OXiT1HQhLTTOhhGh0LsFxo1vyz/vmeNSEpNrV34ydwG6JJcz2UHuGqzmT 0sknWJ19Ay7Ygv3MHq0O33CnS2lSqe7ZbSt/nTWevS16/ldYqxoqpuETL0oGX//08sTm eBsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=Cs9uCuur; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s59si59589777plb.294.2019.08.13.03.01.17; Tue, 13 Aug 2019 03:01:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=Cs9uCuur; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728735AbfHMKAf (ORCPT + 99 others); Tue, 13 Aug 2019 06:00:35 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:7120 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728472AbfHMKAc (ORCPT ); Tue, 13 Aug 2019 06:00:32 -0400 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x7D9vEqw021952; Tue, 13 Aug 2019 12:00:12 +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=aoyRokR5kzUkomjm7Ywbps3L0Afaxia9MCls/Ada1gA=; b=Cs9uCuurKtt/S7y9CqRY/NdQTCF7vinymf4wbVL/pujdLkggXqyEmfaCYq7NlKa7vieG 3m6H9UQdeNE2MjSEf6fM1OTqS3pNFAi20VJfo6vaCO0lH6CySonZqnccBEfz2cSmRgLq v9wFE4fod6B5bJUJBlieoZWe+9paVL+Xgu2jj2ktY5HpVK32l9NGMA0ko4ACjC0LMMMn mz04VOllLb2iq5m/0V7iVvkPLLO3557lDgQl7PnX95nYzbrz6O3VxWnmp89+FtxRyIul MDDnmiUQqQc8+/a6h+B2KveWZQlN5kIg9awAseoBtv1RflULRJ1GmaPqzxHsP52K9kME GA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2u9kpuqdd0-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 13 Aug 2019 12:00:12 +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 2B79C42; Tue, 13 Aug 2019 10:00:11 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 163D52CC9D1; Tue, 13 Aug 2019 12:00:11 +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; Tue, 13 Aug 2019 12:00:10 +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; Tue, 13 Aug 2019 12:00:07 +0200 From: Ludovic Barre To: Ulf Hansson , Rob Herring CC: , Maxime Coquelin , Alexandre Torgue , , , , , , Ludovic Barre Subject: [PATCH V5 0/3] mmc: mmci: add busy detect for stm32 sdmmc variant Date: Tue, 13 Aug 2019 11:59:48 +0200 Message-ID: <20190813095951.26275-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:,, definitions=2019-08-13_04:,, 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 calback. 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 | 178 +++++++++++++++++----------- drivers/mmc/host/mmci.h | 7 +- drivers/mmc/host/mmci_stm32_sdmmc.c | 38 ++++++ 3 files changed, 151 insertions(+), 72 deletions(-) -- 2.17.1