Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1234925imm; Tue, 2 Oct 2018 05:10:38 -0700 (PDT) X-Google-Smtp-Source: ACcGV62cEw+QgnrUZgUADXlQ53lVjQ06Jiqe3eIG6tLcxXC3iw8WTM6ImIGY6ewSS5gvNxdhItun X-Received: by 2002:a17:902:8e8b:: with SMTP id bg11-v6mr16277536plb.219.1538482238468; Tue, 02 Oct 2018 05:10:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538482238; cv=none; d=google.com; s=arc-20160816; b=lVXf7GfXtyB5KU9pK1EsqZx5zRrfAmxNsumVnYG/8gApLOl/9qDemPQ39MVOJc4wYR UYeGcjsL0/B7x1z8x3gCWav+JJyZNnRTE8U/dSxGK77vAiOW3qaYEuHVjmVDRcthkbO4 IXD8bi7P0fOXfw5EA0KsVyH/PkEihzcV1qI+8OhOI5MKkPXs1SBTfKQ9FddxTVufTe3+ VXTcdm5SDDN55nDmjztXngswMdds5A5AI6n3vFJiczIOHoFGhQ/xfKPXUmX9nFEpZqUE HKnG9L20hkcXaJwZLsGCdiqpOY0/gLVKvlx6gaQPS8yIMgzrGn5oJtDhX3xQSvY7TGBY ONOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=ryfVlFSseQRmaU7STWpQ6BrWKGW7dMu4/cj8Nge0m3w=; b=AxHtGXHQDFgOypVAG4j85+qRYNSF8E+jNkvhDsoj2vb//Xw3//eWDjysbRf//38kfW LiJA/r0/obCDGh9iRqOh/kAJfdyNoypZ22oIawvfXQPu2Llv7Q0JQadSiPv/fOn0B/wG wJbJ6eyng+Rp9M/houMRzroUl/6TTm7/bijefGkNsZeWD0sxmcqOk9MoA2Cj6HSj/EOv CZDath4pOOSaMlpj2h+62e92Xr+a3WVDHLHSfG6XcXlgi5toDZyGyryXP21viye060uk Km3JpsbvHS/PMwX3noLn+7PoVmd07eVInkd3+VV5PcFRS7E8IohcMAuWK1sATgwUDbLL Kr4w== ARC-Authentication-Results: i=1; mx.google.com; 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 b13-v6si14029909pgj.154.2018.10.02.05.10.23; Tue, 02 Oct 2018 05:10:38 -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; 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 S1727750AbeJBSxG (ORCPT + 99 others); Tue, 2 Oct 2018 14:53:06 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:36906 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727557AbeJBSxE (ORCPT ); Tue, 2 Oct 2018 14:53:04 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w92C8ckd013527; Tue, 2 Oct 2018 14:09:50 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2msxh6gskp-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 02 Oct 2018 14:09:50 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 8ECEB31; Tue, 2 Oct 2018 12:09:49 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7305F2A3B; Tue, 2 Oct 2018 12:09:49 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 2 Oct 2018 14:09: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.361.1; Tue, 2 Oct 2018 14:09:48 +0200 From: Ludovic Barre To: Ulf Hansson , Rob Herring CC: Maxime Coquelin , Alexandre Torgue , , Gerald Baeza , Loic Pallardy , , , , , , Ludovic Barre Subject: [PATCH V4 07/25] mmc: mmci: add dma_release callback Date: Tue, 2 Oct 2018 14:09:09 +0200 Message-ID: <1538482167-13819-8-git-send-email-ludovic.Barre@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538482167-13819-1-git-send-email-ludovic.Barre@st.com> References: <1538482167-13819-1-git-send-email-ludovic.Barre@st.com> 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=2018-10-02_03:,, 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 adds dma_release callback at mmci_host_ops to allow to call specific variant. Signed-off-by: Ludovic Barre --- drivers/mmc/host/mmci.c | 15 ++++++++------- drivers/mmc/host/mmci.h | 2 ++ drivers/mmc/host/mmci_qcom_dml.c | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 9236d4f..8f482f3 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -378,6 +378,12 @@ void mmci_dma_setup(struct mmci_host *host) host->use_dma = true; } +void mmci_dma_release(struct mmci_host *host) +{ + if (host->ops && host->ops->dma_release) + host->ops->dma_release(host); +} + int mmci_prep_data(struct mmci_host *host, struct mmc_data *data, bool next) { int err; @@ -482,8 +488,6 @@ struct mmci_dmae_priv { struct mmci_dmae_next next_data; }; -static inline void mmci_dma_release(struct mmci_host *host); - int mmci_dmae_setup(struct mmci_host *host) { const char *rxname, *txname; @@ -552,7 +556,7 @@ int mmci_dmae_setup(struct mmci_host *host) * This is used in or so inline it * so it can be discarded. */ -static inline void mmci_dma_release(struct mmci_host *host) +void mmci_dmae_release(struct mmci_host *host) { struct mmci_dmae_priv *dmae = host->dma_priv; @@ -818,13 +822,10 @@ static struct mmci_host_ops mmci_variant_ops = { .unprep_data = mmci_dmae_unprep_data, .get_next_data = mmci_dmae_get_next_data, .dma_setup = mmci_dmae_setup, + .dma_release = mmci_dmae_release, }; #else /* Blank functions if the DMA engine is not available */ -static inline void mmci_dma_release(struct mmci_host *host) -{ -} - static inline void mmci_dma_finalize(struct mmci_host *host, struct mmc_data *data) { diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h index 8d65d55..9deca99 100644 --- a/drivers/mmc/host/mmci.h +++ b/drivers/mmc/host/mmci.h @@ -279,6 +279,7 @@ struct mmci_host_ops { int err); void (*get_next_data)(struct mmci_host *host, struct mmc_data *data); int (*dma_setup)(struct mmci_host *host); + void (*dma_release)(struct mmci_host *host); }; struct mmci_host { @@ -339,4 +340,5 @@ void mmci_dmae_unprep_data(struct mmci_host *host, struct mmc_data *data, int err); void mmci_dmae_get_next_data(struct mmci_host *host, struct mmc_data *data); int mmci_dmae_setup(struct mmci_host *host); +void mmci_dmae_release(struct mmci_host *host); diff --git a/drivers/mmc/host/mmci_qcom_dml.c b/drivers/mmc/host/mmci_qcom_dml.c index 16ae40e..5334427 100644 --- a/drivers/mmc/host/mmci_qcom_dml.c +++ b/drivers/mmc/host/mmci_qcom_dml.c @@ -187,6 +187,7 @@ static struct mmci_host_ops qcom_variant_ops = { .unprep_data = mmci_dmae_unprep_data, .get_next_data = mmci_dmae_get_next_data, .dma_setup = qcom_dma_setup, + .dma_release = mmci_dmae_release, }; void qcom_variant_init(struct mmci_host *host) -- 2.7.4