All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Ludovic BARRE <ludovic.barre@st.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	Gerald Baeza <gerald.baeza@st.com>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	devicetree@vger.kernel.org,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH 02/19] mmc: mmci: merge qcom dml feature into mmci dma
Date: Fri, 13 Jul 2018 13:17:49 +0200	[thread overview]
Message-ID: <CAPDyKFrN3GMez1vyc6xQUH_Qp7UrDj88rG9pAP_oTLHOB6k91g@mail.gmail.com> (raw)
In-Reply-To: <c09e8f7a-3bf7-abb3-b49c-011ae29f8d67@st.com>

On 11 July 2018 at 17:19, Ludovic BARRE <ludovic.barre@st.com> wrote:
>
>
> On 07/05/2018 05:26 PM, Ulf Hansson wrote:
>>
>> On 12 June 2018 at 15:14, Ludovic Barre <ludovic.Barre@st.com> wrote:
>>>
>>> From: Ludovic Barre <ludovic.barre@st.com>
>>>
>>> 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 <ludovic.barre@st.com>
>>> ---
>>>   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.

[...]

Kind regards
Uffe

WARNING: multiple messages have this Message-ID (diff)
From: ulf.hansson@linaro.org (Ulf Hansson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 02/19] mmc: mmci: merge qcom dml feature into mmci dma
Date: Fri, 13 Jul 2018 13:17:49 +0200	[thread overview]
Message-ID: <CAPDyKFrN3GMez1vyc6xQUH_Qp7UrDj88rG9pAP_oTLHOB6k91g@mail.gmail.com> (raw)
In-Reply-To: <c09e8f7a-3bf7-abb3-b49c-011ae29f8d67@st.com>

On 11 July 2018 at 17:19, Ludovic BARRE <ludovic.barre@st.com> wrote:
>
>
> On 07/05/2018 05:26 PM, Ulf Hansson wrote:
>>
>> On 12 June 2018 at 15:14, Ludovic Barre <ludovic.Barre@st.com> wrote:
>>>
>>> From: Ludovic Barre <ludovic.barre@st.com>
>>>
>>> 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 <ludovic.barre@st.com>
>>> ---
>>>   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.

[...]

Kind regards
Uffe

  reply	other threads:[~2018-07-13 11:17 UTC|newest]

Thread overview: 110+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-12 13:14 [PATCH 00/19] mmc: mmci: add stm32 sdmmc variant Ludovic Barre
2018-06-12 13:14 ` Ludovic Barre
2018-06-12 13:14 ` Ludovic Barre
2018-06-12 13:14 ` [PATCH 01/19] mmc: mmci: regroup and define dma operations Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-07-05 15:17   ` Ulf Hansson
2018-07-05 15:17     ` Ulf Hansson
2018-07-11  9:41     ` Ludovic BARRE
2018-07-11  9:41       ` Ludovic BARRE
2018-07-11  9:41       ` Ludovic BARRE
2018-07-11 12:16       ` Ulf Hansson
2018-07-11 12:16         ` Ulf Hansson
2018-07-12  9:09         ` Ludovic BARRE
2018-07-12  9:09           ` Ludovic BARRE
2018-07-12  9:09           ` Ludovic BARRE
2018-06-12 13:14 ` [PATCH 02/19] mmc: mmci: merge qcom dml feature into mmci dma Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-07-05 15:26   ` Ulf Hansson
2018-07-05 15:26     ` Ulf Hansson
2018-07-11 15:19     ` Ludovic BARRE
2018-07-11 15:19       ` Ludovic BARRE
2018-07-11 15:19       ` Ludovic BARRE
2018-07-13 11:17       ` Ulf Hansson [this message]
2018-07-13 11:17         ` Ulf Hansson
2018-07-13 13:08         ` Ludovic BARRE
2018-07-13 13:08           ` Ludovic BARRE
2018-07-13 13:08           ` Ludovic BARRE
2018-07-30 15:15           ` Ulf Hansson
2018-07-30 15:15             ` Ulf Hansson
2018-06-12 13:14 ` [PATCH 03/19] mmc: mmci: add datactrl block size variant property Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14 ` [PATCH 04/19] mmc: mmci: expand startbiterr to irqmask and error check Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14 ` [PATCH 05/19] mmc: mmci: allow to overwrite clock/power procedure to specific variant Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-07-05 13:48   ` Ulf Hansson
2018-07-05 13:48     ` Ulf Hansson
2018-07-11 12:19     ` Ludovic BARRE
2018-07-11 12:19       ` Ludovic BARRE
2018-07-11 12:19       ` Ludovic BARRE
2018-07-11 12:38       ` Ulf Hansson
2018-07-11 12:38         ` Ulf Hansson
2018-06-12 13:14 ` [PATCH 06/19] mmc: mmci: add variant properties to define cpsm & cmdresp bits Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-07-05 14:20   ` Ulf Hansson
2018-07-05 14:20     ` Ulf Hansson
2018-06-12 13:14 ` [PATCH 07/19] mmc: mmci: add variant property to define dpsm bit Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14 ` [PATCH 08/19] mmc: mmci: add variant property to define irq pio mask Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14 ` [PATCH 09/19] mmc: mmci: add variant property to write datactrl before command Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14 ` [PATCH 10/19] mmc: mmci: add variant property to allow remain data Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-07-05 13:55   ` Ulf Hansson
2018-07-05 13:55     ` Ulf Hansson
2018-06-12 13:14 ` [PATCH 11/19] mmc: mmci: add variant property to check specific data constraint Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14 ` [PATCH 12/19] mmc: mmci: add variant property to request a reset Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-25 21:23   ` Rob Herring
2018-06-25 21:23     ` Rob Herring
2018-06-12 13:14 ` [PATCH 13/19] mmc: mmci: send stop cmd if a data command fail Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-07-04 13:37   ` Ulf Hansson
2018-07-04 13:37     ` Ulf Hansson
2018-07-11  8:57     ` Ludovic BARRE
2018-07-11  8:57       ` Ludovic BARRE
2018-07-11  8:57       ` Ludovic BARRE
2018-06-12 13:14 ` [PATCH 14/19] mmc: mmci: add clock divider for stm32 sdmmc Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14 ` [PATCH 15/19] mmc: mmci: add stm32 sdmmc registers Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14 ` [PATCH 16/19] mmc: mmci: add DT bindings for STM32 sdmmc Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-25 21:47   ` Rob Herring
2018-06-25 21:47     ` Rob Herring
2018-06-12 13:14 ` [PATCH 17/19] mmc: mmci: add stm32 sdmmc idma support Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14 ` [PATCH 18/19] mmc: mmci: add specific clk/pwr procedure for stm32 sdmmc Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-07-05 14:49   ` Ulf Hansson
2018-07-05 14:49     ` Ulf Hansson
2018-07-05 14:49     ` Ulf Hansson
2018-06-12 13:14 ` [PATCH 19/19] mmc: mmci: add stm32 sdmmc variant Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-12 13:14   ` Ludovic Barre
2018-06-29 13:51 ` [PATCH 00/19] " Ludovic BARRE
2018-06-29 13:51   ` Ludovic BARRE
2018-06-29 13:51   ` Ludovic BARRE
2018-06-29 15:18   ` Ulf Hansson
2018-06-29 15:18     ` Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPDyKFrN3GMez1vyc6xQUH_Qp7UrDj88rG9pAP_oTLHOB6k91g@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=alexandre.torgue@st.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gerald.baeza@st.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ludovic.barre@st.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.