Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4076492imm; Mon, 30 Jul 2018 08:16:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfvRlCo6cH/rpr8Q4SRdqB21Eak+29oj75TQI3dJrH7HN8nlw/PPahyeLYlR7pDNcbuVX8u X-Received: by 2002:a62:3b89:: with SMTP id w9-v6mr18310792pfj.80.1532963780337; Mon, 30 Jul 2018 08:16:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532963780; cv=none; d=google.com; s=arc-20160816; b=e21NdxOiwNNDBbm1kfrCfSWnfiMOamBX3d+8tvwTicEZlfdlSk9Ye5vibZx9nBYmhB hmyH5B7hSqLGNyX8PeZK3fNCqH3b/uXIhgUVUjRsDUP6zX7b+YupUeBEc/IsVvpKWnVh X5y9dM37wocdGsffiaRZS0johe/w9rhan22WXuylE4F6ZCuWCnbChiJaPGLuASpWaBJt X6IqWBLNKenbq1uHWfuhlm3FV3N8HZ0q3izGQpXXuKtKo2m8/PfOOI1c1GF0OnksQs+z ytZhtI/zSQxECG3w56kgr7DeAxl0yg4ItmBIEnOdDxY7DVwHYRePsxUQQEgFcAlEPg/M NIYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=BhQxubR4utH8PUra/z+1u4E0IGAC3yxZZN4uT0Isgsw=; b=HeuXeg65sZZBSmSPU1lf4Dv1ijF2noFIHVztugjNpFMn4e0SGa9o01+ACnu1Fsdudf 12V2UUAHQQIPdVrw70CFiq7pAbiA4ft9bid6Si02yfo2S0hnwAlXJlkhUt3w7ZtuULLU 38AssJAtjt9p36vj/Q2T+VYOWccaEJ3ocQNnCQqbkN9/g+OZOhHobLhafz/MmlX5kh59 hrohkEy00cZdLf3ZE8D848jh7yp5o+ZYz5dmmP0NhwB+WSr0YKTmUKbI/+ji2MwwDnyS xIOgyrOvl7Z8iM8umipsxzSH+BtAMeosm6kaP1vt4TGz19D9qbZ2WEgOyh7SXRsSD9y5 9SPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LXEAy2fJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9-v6si10525098plb.313.2018.07.30.08.16.06; Mon, 30 Jul 2018 08:16:20 -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=@linaro.org header.s=google header.b=LXEAy2fJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726831AbeG3Qum (ORCPT + 99 others); Mon, 30 Jul 2018 12:50:42 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:42096 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726765AbeG3Qum (ORCPT ); Mon, 30 Jul 2018 12:50:42 -0400 Received: by mail-io0-f195.google.com with SMTP id g11-v6so10141350ioq.9 for ; Mon, 30 Jul 2018 08:15:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=BhQxubR4utH8PUra/z+1u4E0IGAC3yxZZN4uT0Isgsw=; b=LXEAy2fJHWFsbp6Mnh4VvlVVlSixg8uf6i/yF3ytWox9vWg24RlvZxyJ5swL0K8LMx j8ym051E3zwpTpJBASpg1uRfyBXctlQchIvtiN7ZgDJpf3hioUxbXrjDlNtQobfcAefO 3Mb2kkaDsrF2aqt4xKpkn3HtB7WYOtzqbd0Ck= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=BhQxubR4utH8PUra/z+1u4E0IGAC3yxZZN4uT0Isgsw=; b=NcuJpN/Wsb8bVS7hdRncmGOwOdAQE24zSoegFtiIgWLdu11OfaoA4zkJ2WkWlzl04g IFDiWi+Haqk7Y9uv++TYV+Cc0PQaoIfmCSB05hhpS8Z1xLipaS93ZX6SX2jFtj9b0YpA MdBR1eYvVBQU3GL/VgKZUl6KPmnqN/dmTUZIOzv4TUjGnVWyFbV2vMPkOvSgjWMTYxaV u4YRB8Cr5uf+wPpNRN+8cC5Z9BIZkJoMoG38IUHggxmQjWJvTas/odfnbpEbqvknw8yv JLI1W+K6YjG//RsRHbLWcbnI+bIQKF4P0tRkaa4clE98Zfpcl0iGk7K9iMPHphz93Gex 4Wsg== X-Gm-Message-State: AOUpUlH5ed/VKX0fE893vuz8WdF1i08SXDZGV4XQGLkAb5RAo5n4IdDt fUbzxVjoi6EVkyxJg3mEfhk+rRpdl9PJ0/y5Pmx8NeTs X-Received: by 2002:a6b:e403:: with SMTP id u3-v6mr13428349iog.131.1532963715318; Mon, 30 Jul 2018 08:15:15 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:2b03:0:0:0:0:0 with HTTP; Mon, 30 Jul 2018 08:15:14 -0700 (PDT) In-Reply-To: References: <1528809280-31116-1-git-send-email-ludovic.Barre@st.com> <1528809280-31116-3-git-send-email-ludovic.Barre@st.com> From: Ulf Hansson Date: Mon, 30 Jul 2018 17:15:14 +0200 Message-ID: Subject: Re: [PATCH 02/19] mmc: mmci: merge qcom dml feature into mmci dma To: Ludovic BARRE Cc: Rob Herring , Maxime Coquelin , Alexandre Torgue , Gerald Baeza , Linux ARM , Linux Kernel Mailing List , devicetree@vger.kernel.org, "linux-mmc@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13 July 2018 at 15:08, Ludovic BARRE wrote: > > > 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 The latter seems better. Kind regards Uffe