All of lore.kernel.org
 help / color / mirror / Atom feed
From: Suman Anna <s-anna@ti.com>
To: Jassi Brar <jaswinder.singh@linaro.org>, Arnd Bergmann <arnd@arndb.de>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"ks.giri@samsung.com" <ks.giri@samsung.com>,
	"ijc+devicetree@hellion.org.uk" <ijc+devicetree@hellion.org.uk>,
	Mark Rutland <Mark.Rutland@arm.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	Pawel Moll <Pawel.Moll@arm.com>,
	"courtney.cavin@sonymobile.com" <courtney.cavin@sonymobile.com>,
	"mporter@linaro.org" <mporter@linaro.org>,
	"slapdau@yahoo.com.au" <slapdau@yahoo.com.au>,
	"lftan.linux@gmail.com" <lftan.linux@gmail.com>,
	"loic.pallardy@st.com" <loic.pallardy@st.com>,
	"ashwin.chaugule@linaro.org" <ashwin.chaugule@linaro.org>,
	"bjorn@kryo.se" <bjorn@kryo.se>,
	"patches@linaro.org" <patches@linaro.org>,
	"Mollie.Wu@tw.fujitsu.com" <Mollie.Wu@tw.fujitsu.com>,
	"t.takinishi@jp.fujitsu.com" <t.takinishi@jp.fujitsu.com>
Subject: Re: [PATCHv8 2/2] mailbox: Introduce framework for mailbox
Date: Wed, 16 Jul 2014 11:09:47 -0500	[thread overview]
Message-ID: <53C6A3CB.5060005@ti.com> (raw)
In-Reply-To: <CAJe_Zhf8oH-MPg6HtFDoT6_LZxJzy3ff85-GsWcENQftNiJMxw@mail.gmail.com>

Hi,

On 07/16/2014 09:18 AM, Jassi Brar wrote:
> On 16 July 2014 19:38, Arnd Bergmann <arnd@arndb.de> wrote:
>> On Wednesday 16 July 2014 18:42:22 Jassi Brar wrote:
>>> On 16 July 2014 18:39, Arnd Bergmann <arnd@arndb.de> wrote:
>>>> On Wednesday 16 July 2014 18:35:33 Jassi Brar wrote:
>>>>> On 16 July 2014 18:15, Arnd Bergmann <arnd@arndb.de> wrote:
>>>>>> On Wednesday 16 July 2014 18:07:04 Jassi Brar wrote:
>>>>>>> On 16 July 2014 15:46, Arnd Bergmann <arnd@arndb.de> wrote:
>>>>>>>> On Wednesday 16 July 2014 10:40:19 Sudeep Holla wrote:
>>>>>>>>>> +
>>>>>>>>>> +Required property:
>>>>>>>>>> +- mbox: List of phandle and mailbox channel specifier.
>>>>>>>>>> +
>>>>>>>>>> +- mbox-names: List of identifier strings for each mailbox channel
>>>>>>>>>> +               required by the client.
>>>>>>>>>> +
>>>>>>>>>
>>>>>>>>> IMO the mailbox names are more associated with the controller channels/
>>>>>>>>> mailbox rather than the clients using it. Does it make sense to move
>>>>>>>>> this under controller. It also avoid each client replicating the names.
>>>>>>>>
>>>>>>>> I think it would be best to just make the mbox-names property optional,
>>>>>>>> like we have for other subsystems.
>>>>>>>>
>>>>>>> A very similar subsystem - DMAEngine also has 'dma-names' as a
>>>>>>> required property.
>>>>>>>
>>>>>>> If a client is assigned only 1 mbox in DT, we can do without
>>>>>>> mbox-names. But I am not sure what to do if a client needs two or more
>>>>>>> differently capable mboxes? Simply allocating in order of mbox request
>>>>>>> doesn't seem very robust.
>>>>>>
>>>>>> Traditionally, these things (regs, interrupts, ...) are just accessed
>>>>>> by index. The reason why dmaengine requires the name is that some machines
>>>>>> can use multiple DMA engine devices attached to the same request line,
>>>>>> so the dmaengine subsystem can pick any of them that has a matching
>>>>>> name.
>>>>> And also, I think, when a client needs 2 different dma channels, say
>>>>> for RX and TX each. The api can't assign the first channel specified
>>>>> in 'dmas' property to the first channel request that comes to it,
>>>>> unless we assume client driver always requests dma channels in the
>>>>> order written in its DT node.  And this is the main reason I see for
>>>>> having mbox-names property.
>>>>
>>>> Most subsystems require passing an explicit index in this case.
>>>>
>>>>>   If we make mbox-names optional, do we assume client driver must
>>>>> request mbox in the order specified in its DT node?
>>>>
>>>> Correct.
>>>>
>>> OK. So how about we drop mbox-names altogether and expect client
>>> driver to simply provide an index of the mbox needed?
>>
>> That would be fine with me, but I think a lot of people like
>> the idea of identifying things by name, and are used to that
>> from the other subsystems.
>>
>> Maybe you can leave the mbox-names property defined as 'optional'
>> in the generic mbox binding but remove the code in Linux? That way
>> we can always put it back at a later point without changing the
>> binding in an incompatible way.

I like this too, especially given that the framework uses this only to
retrieve the index. The mbox_client structure currently requires the
chan_name to be filled in, which means both the client driver and the
framework end up having to parse the property.

While we are at this, how about we change the property name from "mbox"
to a plural-form "mboxes" to be inline with gpios, dmas etc.

regards
Suman

>>
>> Individual mailbox clients can mandate specific strings.
>>
> Sounds great.
> 
> Thanks
> Jassi
> 

  reply	other threads:[~2014-07-16 16:09 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-11  9:32 [PATCHv8 0/2] Common Mailbox Framework Jassi Brar
2014-07-11  9:32 ` Jassi Brar
     [not found] ` <1405071167-14503-1-git-send-email-jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-11  9:34   ` [PATCHv8 1/2] mailbox: rename pl320-ipc specific mailbox.h Jassi Brar
2014-07-11  9:34     ` Jassi Brar
     [not found]     ` <1405071252-14630-1-git-send-email-jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-11 17:12       ` Arnd Bergmann
2014-07-11 17:12         ` Arnd Bergmann
2014-07-11  9:35 ` [PATCHv8 2/2] mailbox: Introduce framework for mailbox Jassi Brar
2014-07-11 17:26   ` Arnd Bergmann
     [not found]     ` <201407111926.13939.arnd-r2nGTMty4D4@public.gmane.org>
2014-07-14  5:40       ` Jassi Brar
2014-07-14  5:40         ` Jassi Brar
2014-07-11 22:09   ` Markus Mayer
     [not found]     ` <CAPdLdqmBUFaCjdLrYJh3P2jizYC3GP0g7ut+FNaLQ5a73gMp0w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-14  4:56       ` Jassi Brar
2014-07-14  4:56         ` Jassi Brar
     [not found]   ` <1405071325-14683-1-git-send-email-jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-11 11:46     ` Ashwin Chaugule
2014-07-11 11:46       ` Ashwin Chaugule
     [not found]       ` <CAJ5Y-eYPffYQ57ERODyBYYKjL2FVhGapKmP0YxzcT9rswfaJaA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-14  4:17         ` Jassi Brar
2014-07-14  4:17           ` Jassi Brar
     [not found]           ` <CAJe_Zhe5W4D+TzyfKdE8KvSc8SJwyHG3SQGpUyd8-ML-wHBDyg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-14  8:04             ` Ashwin Chaugule
2014-07-14  8:04               ` Ashwin Chaugule
2014-07-16  9:40     ` Sudeep Holla
2014-07-16  9:40       ` Sudeep Holla
     [not found]       ` <53C64883.2050709-5wv7dgnIgG8@public.gmane.org>
2014-07-16 10:16         ` Arnd Bergmann
2014-07-16 10:16           ` Arnd Bergmann
2014-07-16 11:16           ` Sudeep Holla
2014-07-16 11:16             ` Sudeep Holla
2014-07-16 11:32             ` Arnd Bergmann
2014-07-16 11:32               ` Arnd Bergmann
2014-07-16 13:29               ` Sudeep Holla
2014-07-16 13:29                 ` Sudeep Holla
2014-07-16 12:37           ` Jassi Brar
2014-07-16 12:37             ` Jassi Brar
     [not found]             ` <CAJe_ZheAjhufEf3c72bwbvF11P070hxh0qZ9s5KDxwFUgH1ixg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-16 12:45               ` Arnd Bergmann
2014-07-16 12:45                 ` Arnd Bergmann
2014-07-16 13:05                 ` Jassi Brar
2014-07-16 13:05                   ` Jassi Brar
2014-07-16 13:09                   ` Arnd Bergmann
2014-07-16 13:09                     ` Arnd Bergmann
2014-07-16 13:12                     ` Jassi Brar
2014-07-16 13:12                       ` Jassi Brar
2014-07-16 14:08                       ` Arnd Bergmann
2014-07-16 14:08                         ` Arnd Bergmann
2014-07-16 14:18                         ` Jassi Brar
2014-07-16 14:18                           ` Jassi Brar
2014-07-16 16:09                           ` Suman Anna [this message]
     [not found]                             ` <53C6A3CB.5060005-l0cyMroinI0@public.gmane.org>
2014-07-17  7:25                               ` Jassi Brar
2014-07-17  7:25                                 ` Jassi Brar
2014-07-16 14:34                         ` Sudeep Holla
2014-07-16 14:34                           ` Sudeep Holla

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=53C6A3CB.5060005@ti.com \
    --to=s-anna@ti.com \
    --cc=Mark.Rutland@arm.com \
    --cc=Mollie.Wu@tw.fujitsu.com \
    --cc=Pawel.Moll@arm.com \
    --cc=arnd@arndb.de \
    --cc=ashwin.chaugule@linaro.org \
    --cc=bjorn@kryo.se \
    --cc=courtney.cavin@sonymobile.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jaswinder.singh@linaro.org \
    --cc=ks.giri@samsung.com \
    --cc=lftan.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.pallardy@st.com \
    --cc=mporter@linaro.org \
    --cc=patches@linaro.org \
    --cc=robh+dt@kernel.org \
    --cc=slapdau@yahoo.com.au \
    --cc=sudeep.holla@arm.com \
    --cc=t.takinishi@jp.fujitsu.com \
    /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.