From: Arnd Bergmann <arnd@arndb.de>
To: linaro-acpi@lists.linaro.org
Cc: Jassi Brar <jaswinder.singh@linaro.org>,
Ashwin Chaugule <ashwin.chaugule@linaro.org>,
Patch Tracking <patches@linaro.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux acpi <linux-acpi@vger.kernel.org>,
Mark Brown <broonie@kernel.org>, "lv.zheng" <lv.zheng@intel.com>
Subject: Re: [Linaro-acpi] [PATCH v10 1/1] Mailbox: Add support for Platform Communication Channel
Date: Tue, 11 Nov 2014 17:33:28 +0100 [thread overview]
Message-ID: <2214649.QGmZRRXly3@wuerfel> (raw)
In-Reply-To: <CAJe_ZhcJzC1N4pESC-BTe=MXFJuOw2Pj61TaZEOs52QQHULhSg@mail.gmail.com>
On Tuesday 11 November 2014 19:27:07 Jassi Brar wrote:
> On 11 November 2014 18:32, Ashwin Chaugule <ashwin.chaugule@linaro.org> wrote:
> > On 10 November 2014 23:04, Jassi Brar <jaswinder.singh@linaro.org> wrote:
>
> In even simpler terms.... I prefer controller specific
> encoding(0x50434300) instead of controller specific api
> (pcc_mbox_request_channel). For a different class of controller, it
> is much cleaner to define a new encoding as compared to another
> xyz_mbox_request_channel() api.
The problem with this approach is that it still leaves the interface
as controller specific, because the client now has to know that it
must pass the PCC identifier instead of an index.
A client driver using DT would just specify to use the first channel
that is defined locally in the "mboxes" properties, so it can ask for
chan = mbox_request_channel(client, 0);
to get the first channel defined for this client while a driver using
ACPI has to look up the identifier in its own local tables:
u32 channel_id = this_driver_parse_acpi_and_find_pccid(dev);
chan = mbox_request_channel(client, channel_id);
which is not the same interface as the first, even if you assume the
channel_id to be globally unique in the system.
Since we will need clients to have a consistent interface across
DT and ACPI, I think the difference in firmware interfaces is better
abstracted in a PCC specific interface.
The client driver would still need to parse two different firmware
structures, but it would at least have a consistent interface:
u32 channel_id = of_property_read_u32(dev->of_node, "pccid");
if (!channel_id)
channel_id = this_driver_parse_acpi_and_find_pccid(dev);
chan = mbox_request_channel(client, channel_id);
Alternatively, the driver could use the regular API on DT:
chan = mbox_request_channel(cl, 0);
if (!chan) {
u32 chan_id = this_driver_parse_acpi_and_find_pccid(dev);
chan = mbox_request_channel(client, channel_id);
}
For any firmware that we have control over, the mbox_request_channel()
case could even be made to work in ACPI, if we decide to add the
properties we use in DT with the new _DSD method.
Arnd
next prev parent reply other threads:[~2014-11-11 16:33 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 14:52 [PATCH v10 0/1] PCC: Platform Communication Channel Ashwin Chaugule
2014-11-07 14:52 ` [PATCH v10 1/1] Mailbox: Add support for " Ashwin Chaugule
2014-11-09 13:48 ` Jassi Brar
2014-11-09 15:20 ` Ashwin Chaugule
2014-11-09 16:18 ` Jassi Brar
2014-11-09 17:22 ` Ashwin Chaugule
2014-11-10 4:13 ` Jassi Brar
2014-11-10 12:57 ` Ashwin Chaugule
2014-11-10 13:39 ` Jassi Brar
2014-11-10 13:53 ` Ashwin Chaugule
2014-11-10 14:16 ` Jassi Brar
2014-11-10 14:47 ` Ashwin Chaugule
2014-11-10 17:44 ` Jassi Brar
2014-11-10 20:13 ` Mark Brown
2014-11-10 20:29 ` [Linaro-acpi] " Arnd Bergmann
2014-11-11 4:31 ` Jassi Brar
2014-11-11 4:04 ` Jassi Brar
2014-11-11 13:02 ` Ashwin Chaugule
2014-11-11 13:57 ` Jassi Brar
2014-11-11 16:33 ` Arnd Bergmann [this message]
2014-11-11 17:39 ` [Linaro-acpi] " Jassi Brar
2014-11-11 17:54 ` Arnd Bergmann
2014-11-11 19:08 ` Jassi Brar
2014-11-11 19:22 ` Ashwin Chaugule
2014-11-11 20:38 ` Arnd Bergmann
2014-11-11 17:53 ` Mark Brown
2014-11-11 10:30 ` Sudeep Holla
2014-11-11 13:18 ` Ashwin Chaugule
2014-11-11 15:01 ` Sudeep Holla
2014-11-11 20:25 ` Arnd Bergmann
2014-11-12 13:32 ` Sudeep Holla
2014-11-12 13:48 ` Ashwin Chaugule
2014-11-12 14:03 ` Sudeep Holla
2014-11-12 18:25 ` [Linaro-acpi] " Ashwin Chaugule
2014-11-12 18:26 ` Mark Brown
2014-11-12 19:04 ` Jassi Brar
2014-11-12 19:16 ` Ashwin Chaugule
2014-11-11 17:29 ` Mark Brown
2014-11-11 18:07 ` Sudeep Holla
2014-11-11 15:12 ` Jassi Brar
2014-11-11 15:19 ` Ashwin Chaugule
2014-11-11 15:25 ` 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=2214649.QGmZRRXly3@wuerfel \
--to=arnd@arndb.de \
--cc=ashwin.chaugule@linaro.org \
--cc=broonie@kernel.org \
--cc=jaswinder.singh@linaro.org \
--cc=linaro-acpi@lists.linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=lv.zheng@intel.com \
--cc=patches@linaro.org \
--cc=rjw@rjwysocki.net \
/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