From: Matt Porter <mporter@linaro.org>
To: Jassi Brar <jaswinder.singh@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
Jassi Brar <jassisinghbrar@gmail.com>,
lkml <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Anna, Suman" <s-anna@ti.com>,
Loic Pallardy <loic.pallardy@st.com>,
LeyFoon Tan <lftan.linux@gmail.com>,
Craig McGeachie <slapdau@yahoo.com.au>,
Courtney Cavin <courtney.cavin@sonymobile.com>,
Rob Herring <robherring2@gmail.com>,
Josh Cartwright <joshc@codeaurora.org>,
Linus Walleij <linus.walleij@linaro.org>,
Kumar Gala <galak@codeaurora.org>,
"ks.giri@samsung.com" <ks.giri@samsung.com>
Subject: Re: [PATCHv5 2/4] mailbox: Introduce framework for mailbox
Date: Thu, 29 May 2014 11:43:48 -0400 [thread overview]
Message-ID: <20140529154348.GH32082@beef> (raw)
In-Reply-To: <CAJe_Zhe_VFTpPW0sKBsqit347MR7QmEDvzvQTyh1DWr3v991tg@mail.gmail.com>
On Fri, May 16, 2014 at 07:03:25PM +0530, Jassi Brar wrote:
> On 15 May 2014 19:57, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Thursday 15 May 2014 11:41:00 Jassi Brar wrote:
...
> >> +struct mbox_controller {
> >> + struct device *dev;
> >> + struct mbox_chan_ops *ops;
> >> + struct mbox_chan *chans;
> >> + int num_chans;
> >> + bool txdone_irq;
> >> + bool txdone_poll;
> >> + unsigned txpoll_period;
> >> + struct mbox_chan *(*of_xlate)(struct mbox_controller *mbox,
> >> + const struct of_phandle_args *sp);
> >> + /*
> >> + * If the controller supports only TXDONE_BY_POLL,
> >> + * this timer polls all the links for txdone.
> >> + */
> >> + struct timer_list poll;
> >> + unsigned period;
> >> + /* Hook to add to the global controller list */
> >> + struct list_head node;
> >> +} __aligned(32);
> >
> > What is the __aligned(32) for?
> >
> Attempt to align access to mailbox?
>
> I am still open to opinion about whether the mailbox ownership should
> be exclusive or shared among clients. Need to handle async messages
> from remote is one reason one might want more than one client to own a
> channel. Allowing for RX via notifiers might be one option but that
> breaks semantics of 'ownership' of a mailbox channel.
This is the case we have on a new family of Broadcom SoCs. One mailbox
channel is the "system" channel and is shared amongst many clients for
reception of unsolicited events from the coprocessor. The same channel
is also used commonly in drivers for debug/inspection of the M0 state.
Functionality for clock, pmu, pinmux, and cpu idle/suspend is implemented
via IPC with the M0 so all of those drivers need to share one mailbox.
There's a lot of common code necessary to construct/parse IPCs for
each of the drivers. I suppose this IPC driver/api could be the
sole owner of that system channel. However, we'd need to develop some
binding to represent IPC resources that devices need to operate. Coming
into this late...I wonder if I missed something about where these vendor
specific IPC layers should live and how, if it makes sense, they should
be represented in DT. In our case, the IPC is an integral part of the
hardware as it's loaded from ROM.
-Matt
next prev parent reply other threads:[~2014-05-29 15:43 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-15 6:08 [PATCHv5 0/4] Common Mailbox Framework Jassi Brar
2014-05-15 6:10 ` [PATCHv5 1/4] mailbox: rename pl320-ipc specific mailbox.h Jassi Brar
2014-05-15 6:11 ` [PATCHv5 2/4] mailbox: Introduce framework for mailbox Jassi Brar
2014-05-15 14:27 ` Arnd Bergmann
2014-05-16 13:33 ` Jassi Brar
2014-05-19 13:08 ` Arnd Bergmann
2014-05-19 18:03 ` Jassi Brar
2014-05-19 19:55 ` Bjorn Andersson
2014-05-19 20:01 ` Arnd Bergmann
2014-05-20 18:11 ` Jassi Brar
2014-05-29 15:43 ` Matt Porter [this message]
2014-05-30 5:31 ` Jassi Brar
2014-06-02 15:14 ` Matt Porter
2014-06-02 17:11 ` Jassi Brar
2014-06-02 22:04 ` Matt Porter
2014-06-03 9:35 ` Sudeep Holla
2014-06-03 10:21 ` Jassi Brar
2014-06-03 15:06 ` Sudeep Holla
2014-06-05 11:12 ` Matt Porter
2014-06-05 11:39 ` Jassi Brar
2014-06-11 16:07 ` Mark Brown
2014-05-21 17:27 ` Mark Brown
2014-05-21 18:14 ` Arnd Bergmann
2014-05-28 4:20 ` Jassi Brar
2014-05-28 15:50 ` Suman Anna
2014-06-11 15:37 ` Mark Brown
2014-05-15 6:11 ` [PATCHv5 3/4] mailbox: Fix TX completion init Jassi Brar
2014-05-15 6:12 ` [PATCHv5 4/4] mailbox: Fix deleteing poll timer Jassi Brar
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=20140529154348.GH32082@beef \
--to=mporter@linaro.org \
--cc=arnd@arndb.de \
--cc=courtney.cavin@sonymobile.com \
--cc=galak@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=jassisinghbrar@gmail.com \
--cc=jaswinder.singh@linaro.org \
--cc=joshc@codeaurora.org \
--cc=ks.giri@samsung.com \
--cc=lftan.linux@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.pallardy@st.com \
--cc=robherring2@gmail.com \
--cc=s-anna@ti.com \
--cc=slapdau@yahoo.com.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).