Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp772738imm; Fri, 13 Jul 2018 06:10:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpePhhLdJU0ovqYukuHbSki+XRUVBXeHFmSYbvqQ/JEIqdcl2yNq+D39CnbOdvnqYFHgWLym X-Received: by 2002:a62:1f06:: with SMTP id f6-v6mr7108504pff.140.1531487445916; Fri, 13 Jul 2018 06:10:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531487445; cv=none; d=google.com; s=arc-20160816; b=ztAPGx622jm2Cc0HINmi1EIgEn0usuHgt1O2D7VdTDuAAqtEl4/8sg6wU/dIhJP6FS PesRAZamVtZvcq+afqBXmrpve9StQG/f30u2/qhdASOa8pX1UISjTwrJn6WlQaiuXhUG JyuxhGHdfazwhGfnA3smTGcj5ct+T8uyJjRlWSTOuDnsm/pbZeOKPCKiSUUa8G5j9q2X 6idTu16qQVCYF8h5Pmu2a5dfHxuy4vc85DNiUhM7OgrgajwSxA10WU0UxXDkffmNAyKD OW0cbvIGmn+kjwUz98t0zHTHvASuYHuhEKDMYwf6TqR2OmuY+Xc2layN66RxUEv4Ll4o PjUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=Hucqk6etKuHYmmaCSM8JMP2Eohu7PzrCv2rYpAlXM9s=; b=czJr0n6IxrObpkG8MIh3wzO49gzZv9/v7wMyb5D8jmh2RuVAN+4lMXjmK7uya4pZ6s jp9fFqNpN4nG1yNJUcruSCIiRMp1VpEOL4qhyeCVdPy9MIj36kvCP7+SeomiFUmgNxPI aPyclCpJBohcg0bcG9n4cMTPIYM14psdutzXlxSqDFmo044F5+Df4VB4U31NbHpLIQNH Ol5fszs8DQlR4dQqCXHQ3zuW7p85paB90nGTDGjSyBneq5TwKMwy231JSB2LaUUWivAt BqVXHeGhfZp2S3NXEAlyPsr1A0uLSRKP5/350qTVQr2nkAln9+THnSarCbnj5aFgFb36 mZkg== 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 x16-v6si10701203pgf.311.2018.07.13.06.10.30; Fri, 13 Jul 2018 06:10:45 -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 S1729960AbeGMNXq (ORCPT + 99 others); Fri, 13 Jul 2018 09:23:46 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:42095 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729284AbeGMNXq (ORCPT ); Fri, 13 Jul 2018 09:23:46 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w6DD4cuo001269; Fri, 13 Jul 2018 15:08:49 +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 2k6tcs0mbe-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 13 Jul 2018 15:08:49 +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 1BE773A; Fri, 13 Jul 2018 13:08:47 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag6node1.st.com [10.75.127.16]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 3DC1C5362; Fri, 13 Jul 2018 13:08:47 +0000 (GMT) Received: from [10.48.0.237] (10.75.127.45) by SFHDAG6NODE1.st.com (10.75.127.16) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 13 Jul 2018 15:08:46 +0200 Subject: Re: [PATCH 02/19] mmc: mmci: merge qcom dml feature into mmci dma To: Ulf Hansson CC: Rob Herring , Maxime Coquelin , Alexandre Torgue , Gerald Baeza , Linux ARM , Linux Kernel Mailing List , , "linux-mmc@vger.kernel.org" References: <1528809280-31116-1-git-send-email-ludovic.Barre@st.com> <1528809280-31116-3-git-send-email-ludovic.Barre@st.com> From: Ludovic BARRE Message-ID: Date: Fri, 13 Jul 2018 15:08:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.45] X-ClientProxiedBy: SFHDAG3NODE1.st.com (10.75.127.7) To SFHDAG6NODE1.st.com (10.75.127.16) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-13_04:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/13/2018 01:17 PM, Ulf Hansson wrote: > On 11 July 2018 at 17:19, Ludovic BARRE wrote: >> >> >> On 07/05/2018 05:26 PM, Ulf Hansson wrote: >>> >>> On 12 June 2018 at 15:14, Ludovic Barre wrote: >>>> >>>> From: Ludovic Barre >>>> >>>> This patch integrates qcom dml feature into mmci_dma file. >>>> Qualcomm Data Mover lite/local is already a variant of mmci dmaengine. >>>> >>>> Signed-off-by: Ludovic Barre >>>> --- >>>> drivers/mmc/host/Makefile | 1 - >>>> drivers/mmc/host/mmci.c | 1 - >>>> drivers/mmc/host/mmci.h | 35 ++++++++ >>>> drivers/mmc/host/mmci_dma.c | 135 ++++++++++++++++++++++++++++- >>>> drivers/mmc/host/mmci_qcom_dml.c | 177 >>>> --------------------------------------- >>>> drivers/mmc/host/mmci_qcom_dml.h | 31 ------- >>>> 6 files changed, 169 insertions(+), 211 deletions(-) >>>> delete mode 100644 drivers/mmc/host/mmci_qcom_dml.c >>>> delete mode 100644 drivers/mmc/host/mmci_qcom_dml.h >>> >>> >>> No, this is not the way to go. Instead I I think there are two options. >>> >>> 1) Keep mmci_qcom_dml.c|h and thus add new files for the stm32 dma >>> variant. >>> >>> 2) Start by renaming mmci_qcom_dml.* to mmc_dma.* and then in the next >>> step add the code for stm32 dma into the renamed files. >>> >>> I guess if there is some overlap in functionality, 2) may be best as >>> it could easier avoid open coding. However, I am fine with whatever >>> option and I expect that you knows what is best. >> >> >> After patch 01 & 05 comments: >> I will try to define a mmci_ops which contain some functions pointer >> called by mmci.c (core). >> A variant defines its mmci_ops. >> where do you define the specific function: >> -in a single file, mmci-ops.c or other (for the name, I'm not inspirated) >> -or in specific file for each variant mmci-qcom.c or mmci-stm32.c >> >> following the comment (above), I think we define a single file? > > If I understand the question, the problem is how we should assign the > mmc host ops, which corresponds to the probed variant data!? > > I took a stub at it and posted two patches which I think you should be > able to build upon. Please have a look. I review your patch on mmci_host_ops and init, I agree with your series, I was going in the same direction. The comment above was on file organization, what do you prefer? -a single file with: all callback and all mmci_host_ops of each variant -or each variant in specific file (like sdhci): mmci-qcom.c | mmci-stm32.c ... > > [...] > > Kind regards > Uffe >