All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney@caviumnetworks.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Matt Redfearn <Matt.Redfearn@imgtec.com>,
	David Daney <david.daney@cavium.com>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	Aleksey Makarov <aleksey.makarov@caviumnetworks.com>,
	Chandrakala Chavva <cchavva@caviumnetworks.com>,
	Aleksey Makarov <aleksey.makarov@auriga.com>,
	Leonid Rosenboim <lrosenboim@caviumnetworks.com>,
	Peter Swain <pswain@cavium.com>,
	Aaron Williams <aaron.williams@cavium.com>,
	Rob Herring <robh+dt@kernel.org>,
	Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [RESEND PATCH v7 1/2] mmc: OCTEON: Add DT bindings for OCTEON MMC controller
Date: Tue, 19 Apr 2016 13:25:13 -0700	[thread overview]
Message-ID: <57169429.10601@caviumnetworks.com> (raw)
In-Reply-To: <CAPDyKFqM3VxYE+KtC++=5=Bjket0mCnLAuN3_436O_=TSMzAHA@mail.gmail.com>

On 04/19/2016 12:33 PM, Ulf Hansson wrote:
> On 19 April 2016 at 18:13, David Daney <ddaney@caviumnetworks.com> wrote:
>> On 04/19/2016 02:15 AM, Ulf Hansson wrote:
>> [...]
>>>
>>>
>>>   From this discussion I have understood that we clearly need a way to
>>> describe mmc slots in DT!
>>>
>>> Unfortunate we should have discussed this before you decided to ship
>>> devices with DTBs containing non accepted DT bindings, but hey better
>>> late than never! :-)
>>
>>
>> This is a point where the DT and mmc maintainers have a continual
>> misunderstanding of the facts.
>>
>> There were requests to discuss the binding as far back as 2012:
>>
>> https://www.linux-mips.org/archives/linux-mips/2012-05/msg00119.html
>>
>> They were met with silence.
>
> I am aware of that. I was not the maintainer of MMC back then, if I
> where I would probably said the same thing as of today.
>
> Moreover, for sure you could have been more persistent trying to get
> peoples attention before you decided to deploy the DTB.

We cannot change the past.  Our only concern should be to develop the 
simplest and cleanest overall implementation possible given the facts as 
they exist today.

>
>>
>> The firmware containing these bindings is out in the wild.  If we deprecate
>> some of the bindings, the driver will still have to support them in the
>> future.
>>
>> In the case of OCTEON based devices, the device tree bindings are a firmware
>> <--> kernel ABI as the device trees always come from the firmware and not
>> some other place.
>
> Now, I am not going spend more time arguing, instead I prefer if we
> can be constructive.
>
> As the maintainer of MMC, I have tried to be helpful by providing you
> with my view on how we can move forward.
>
> I don't think it's a big deal for you to implement something along
> those lines for what I have requested, or is it?

It is a matter of how much manipulation of the device tree we want to do 
before it is handed off to the driver core for device creation.  I would 
like to not do any.

There is a global cost to changing the device tree in early boot.  It 
may not be borne by the MMC sub-system, but it exists none the less.

Given that:

  A) The MMC core doesn't contain the concept of one bus controller with 
multiple "slots".

  B) The existing OCTEON device tree bindings should continue to be 
supported.

There are several options.

   1) Invent new MMC device tree bindings that are different from what 
we currently have, but that convey the same information.

   1a) Change the OCTEON MMC driver to use only these new bindings, and 
write some sort of device tree fix up code that runs in early boot to 
rewrite the device tree MMC properties.   This results in the code 
supporting the OCTEON MMC devices being split between the driver and 
system early boot code.  The cost is an increase in system complexity to 
generate the device tree nodes with new bindings.

   1b) Change the OCTEON MMC driver to use either these new bindings or 
legacy bindings.  In this case all OCTEON MMC code is localized to a 
single driver file.  There is a small increase in complexity to carry 
code to decode both new and legacy device tree bindings.

   2) Use existing OCTEON MMC device tree bindings, as they are 
sufficient to achieve a working driver.  Since the code is all specific 
to the OCTEON MMC driver, any ugliness is contained lexicographically 
near to the features being implemented.  Any feedback related to the 
architecture and style of the driver code would be addressed.

The current state is #2.  My interpretation of your desires is #1a.

I am fine with introducing a new device tree binding.  But, I don't 
think the kernel as a whole nor this specific OCTEON MMC driver will be 
improved by adding more device tree synthesis code in early boot.  Any 
thing that is there should be limited to supporting very old (pre OCTEON 
MMC) firmware that doesn't supply a device tree.  So I would strongly 
support either approach #1b or #2.

David Daney


  reply	other threads:[~2016-04-19 20:41 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-31 15:26 [RESEND PATCH v7 1/2] mmc: OCTEON: Add DT bindings for OCTEON MMC controller Matt Redfearn
2016-03-31 15:26 ` [RESEND PATCH v7 2/2] mmc: OCTEON: Add host driver " Matt Redfearn
2016-04-19 20:46   ` Arnd Bergmann
2016-04-19 21:45     ` David Daney
2016-04-19 22:09       ` Arnd Bergmann
2016-04-19 23:27         ` David Daney
2016-04-19 23:57           ` Arnd Bergmann
2016-04-20  0:02             ` Arnd Bergmann
2016-04-21  8:02           ` Ulf Hansson
2016-04-21 10:15             ` Arnd Bergmann
2016-04-21 12:44               ` Ulf Hansson
2016-04-21 13:19                 ` Arnd Bergmann
2016-04-22 13:54                   ` Ulf Hansson
2016-04-22 16:42                     ` Arnd Bergmann
2016-04-22 17:49                       ` David Daney
2016-04-22 20:23                         ` Arnd Bergmann
2016-04-14 12:45 ` [RESEND PATCH v7 1/2] mmc: OCTEON: Add DT bindings " Ulf Hansson
2016-04-18  8:53   ` Matt Redfearn
2016-04-18 11:13     ` Ulf Hansson
2016-04-18 11:37       ` Matt Redfearn
2016-04-18 12:08         ` Ulf Hansson
2016-04-18 12:57           ` Matt Redfearn
2016-04-18 22:59             ` David Daney
2016-04-19  9:15             ` Ulf Hansson
2016-04-19 16:13               ` David Daney
2016-04-19 19:33                 ` Ulf Hansson
2016-04-19 20:25                   ` David Daney [this message]
2016-04-19 20:56                     ` Arnd Bergmann
2016-04-19 21:50                       ` David Daney
2016-04-20  9:32                     ` Ulf Hansson
2016-04-20 22:32                       ` David Daney
2016-04-20 22:42                         ` Arnd Bergmann

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=57169429.10601@caviumnetworks.com \
    --to=ddaney@caviumnetworks.com \
    --cc=Matt.Redfearn@imgtec.com \
    --cc=aaron.williams@cavium.com \
    --cc=aleksey.makarov@auriga.com \
    --cc=aleksey.makarov@caviumnetworks.com \
    --cc=cchavva@caviumnetworks.com \
    --cc=david.daney@cavium.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=lrosenboim@caviumnetworks.com \
    --cc=pswain@cavium.com \
    --cc=ralf@linux-mips.org \
    --cc=robh+dt@kernel.org \
    --cc=ulf.hansson@linaro.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.