Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp828551ybe; Thu, 5 Sep 2019 06:35:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqywNhjFyrWxgyZGzzFqBe8l7G4fBQQEzyjw5P9A0qeh90S7oRL07kj5625V4iPbgP9tkYDS X-Received: by 2002:aa7:8c03:: with SMTP id c3mr3799537pfd.139.1567690552353; Thu, 05 Sep 2019 06:35:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567690552; cv=none; d=google.com; s=arc-20160816; b=Xb99Qm8kZxSU8qQ2/nmdkHqrO68EyjttHP8uq03p0pfSn+KhotkFOFbV2JoSkdft7q rwgp2sfTWMwuyC4qRvS7JMB573fG85yHhcd7Cj/vZTuqI8QVIOJ0NIb0dMf78+yXGenm VL7oXX1CXfmV3a3jjCm/oaK8pHBecmGhYlWEzDYZhofqyqTEhU/HINm2MIrdqohZBiP/ J+jhh9tmsEHEq/PGXPyrwM9g6kgzk0doqOrFO4y36s/1PDMxySYfjf3pvHVwh4PSDi+I NoBfa22zDwH2vOFPVcolDI2BVbGIyvvtBUvaHrHNiskgCK3FomoxZHrZeNS1OO9eW2xg +Bcw== 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=CFc7V5XirXSeitPE35aKToc2Pe4j/3PUS9ILTMJMjb8=; b=wF8avGB9YiwT1Q+J58JjDseOJFQ8+C4tmz6rq3uuITqu5W79nA/jK/zqBaelAKb/WQ M16TN2lkHcW6F/0POkgATF5hMVxkbsh000fiq/2MhwztdoGy2PWv5fdDKkcf479PosXg fzjlxh7Vw6uTTWobszNzu9Ia+WkPC6kqAB90PvcChBPgYOqmw/8+QTEjNvayBU5ZOoV1 M/P3EYpMCKcKrOb80SwmN0MInW3oW+rHXG7zmVfuHQfTgGJpuDWq05AYIOAm6OFOQMuv vhP/7MUOx8SVPzCvHke9OUgFrNUvSZfL6NMnVip1W55OlGKU83gPYX69sKNWMAuuS05w 5kvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=J5xdMWbz; 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 h31si1777838pgm.129.2019.09.05.06.35.35; Thu, 05 Sep 2019 06:35:52 -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=J5xdMWbz; 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 S2389350AbfIEMWV (ORCPT + 99 others); Thu, 5 Sep 2019 08:22:21 -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