<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/mailbox/pcc.c, branch v4.5</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>mailbox: pcc: fix channel calculation in get_pcc_channel()</title>
<updated>2016-02-02T11:09:13+00:00</updated>
<author>
<name>Alexey Klimov</name>
<email>alexey.klimov@arm.com</email>
</author>
<published>2015-12-10T17:28:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e9c8dc8ba96b165ae72daad3b1f27823c3aee628'/>
<id>e9c8dc8ba96b165ae72daad3b1f27823c3aee628</id>
<content type='text'>
This patch fixes the calculation of pcc_chan for non-zero id.
After the compiler ignores the (unsigned long) cast the
pcc_mbox_channels pointer is type-cast and then the type-cast
offset is added which results in address outside of the range
leading to the kernel crashing.

We might add braces and make it:

pcc_chan = (struct mbox_chan *)
		((unsigned long) pcc_mbox_channels +
		(id * sizeof(*pcc_chan)));

but let's go with array approach here and use id as index.

Tested on Juno board.

Signed-off-by: Alexey Klimov &lt;alexey.klimov@arm.com&gt;
Acked-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Acked-by: Ashwin Chaugule &lt;ashwin.chaugule@linaro.org&gt;
Signed-off-by: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes the calculation of pcc_chan for non-zero id.
After the compiler ignores the (unsigned long) cast the
pcc_mbox_channels pointer is type-cast and then the type-cast
offset is added which results in address outside of the range
leading to the kernel crashing.

We might add braces and make it:

pcc_chan = (struct mbox_chan *)
		((unsigned long) pcc_mbox_channels +
		(id * sizeof(*pcc_chan)));

but let's go with array approach here and use id as index.

Tested on Juno board.

Signed-off-by: Alexey Klimov &lt;alexey.klimov@arm.com&gt;
Acked-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Acked-by: Ashwin Chaugule &lt;ashwin.chaugule@linaro.org&gt;
Signed-off-by: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCC: fix dereference of ERR_PTR</title>
<updated>2015-10-16T05:16:07+00:00</updated>
<author>
<name>Sudip Mukherjee</name>
<email>sudipm.mukherjee@gmail.com</email>
</author>
<published>2015-09-16T14:04:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d311a28a5853857a73d54d15dc30797aa3b1802d'/>
<id>d311a28a5853857a73d54d15dc30797aa3b1802d</id>
<content type='text'>
get_pcc_channel() does not return NULL on error it returns the error code
in ERR_PTR, but we have been checking it for NULL.

Signed-off-by: Sudip Mukherjee &lt;sudip@vectorindia.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
get_pcc_channel() does not return NULL on error it returns the error code
in ERR_PTR, but we have been checking it for NULL.

Signed-off-by: Sudip Mukherjee &lt;sudip@vectorindia.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCC: Initialize PCC Mailbox earlier at boot</title>
<updated>2015-08-25T01:25:46+00:00</updated>
<author>
<name>Ashwin Chaugule</name>
<email>ashwin.chaugule@linaro.org</email>
</author>
<published>2015-08-05T13:40:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d3c68f218f927bd4b14b586ea2dcecee54cf09ad'/>
<id>d3c68f218f927bd4b14b586ea2dcecee54cf09ad</id>
<content type='text'>
This change initializes the PCC Mailbox earlier than
the ACPI processor driver. This enables drivers introduced
in follow up patches (e.g. CPPC) to be probed via the ACPI
processor driver interface. The CPPC probe requires the PCC
channel to be initialized for it to query each CPUs performance
capabilities.

Signed-off-by: Ashwin Chaugule &lt;ashwin.chaugule@linaro.org&gt;
Reviewed-by: Al Stone &lt;al.stone@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change initializes the PCC Mailbox earlier than
the ACPI processor driver. This enables drivers introduced
in follow up patches (e.g. CPPC) to be probed via the ACPI
processor driver interface. The CPPC probe requires the PCC
channel to be initialized for it to query each CPUs performance
capabilities.

Signed-off-by: Ashwin Chaugule &lt;ashwin.chaugule@linaro.org&gt;
Reviewed-by: Al Stone &lt;al.stone@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mailbox: Make mbox_chan_ops const</title>
<updated>2015-05-12T03:48:16+00:00</updated>
<author>
<name>Andrew Bresticker</name>
<email>abrestic@chromium.org</email>
</author>
<published>2015-05-04T17:36:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=05ae797566a66d159cf1e2ee11bf3f6fae40c8eb'/>
<id>05ae797566a66d159cf1e2ee11bf3f6fae40c8eb</id>
<content type='text'>
The mailbox controller's channel ops ought to be read-only.  Update
all the mailbox drivers to make their mbox_chan_ops const as well.

Signed-off-by: Andrew Bresticker &lt;abrestic@chromium.org&gt;
Cc: Ashwin Chaugule &lt;ashwin.chaugule@linaro.org&gt;
Cc: Ley Foon Tan &lt;lftan@altera.com&gt;
Acked-by: Suman Anna &lt;s-anna@ti.com&gt;
Signed-off-by: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The mailbox controller's channel ops ought to be read-only.  Update
all the mailbox drivers to make their mbox_chan_ops const as well.

Signed-off-by: Andrew Bresticker &lt;abrestic@chromium.org&gt;
Cc: Ashwin Chaugule &lt;ashwin.chaugule@linaro.org&gt;
Cc: Ley Foon Tan &lt;lftan@altera.com&gt;
Acked-by: Suman Anna &lt;s-anna@ti.com&gt;
Signed-off-by: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Mailbox: Restructure and simplify PCC mailbox code</title>
<updated>2015-03-04T15:34:22+00:00</updated>
<author>
<name>Ashwin Chaugule</name>
<email>ashwin.chaugule@linaro.org</email>
</author>
<published>2015-01-27T21:03:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=33350e6b1833b15cf9c9c4c84d8534ad68b0c7b8'/>
<id>33350e6b1833b15cf9c9c4c84d8534ad68b0c7b8</id>
<content type='text'>
Previously the PCC driver depended on the client
side to map the communication space base address. This region
was was then used in the PCC driver and the client side.
The client side used this region to read and write its data
and the PCC driver used it to only write the PCC command.
Removing this split simplifies the PCC driver a lot. This patch
moves all communication region read/writes to the client side.
The PCC clients can now drive the PCC mailbox controller via the
mbox_client_txdone() method.

Signed-off-by: Ashwin Chaugule &lt;ashwin.chaugule@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously the PCC driver depended on the client
side to map the communication space base address. This region
was was then used in the PCC driver and the client side.
The client side used this region to read and write its data
and the PCC driver used it to only write the PCC command.
Removing this split simplifies the PCC driver a lot. This patch
moves all communication region read/writes to the client side.
The PCC clients can now drive the PCC mailbox controller via the
mbox_client_txdone() method.

Signed-off-by: Ashwin Chaugule &lt;ashwin.chaugule@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration</title>
<updated>2015-02-11T20:56:40+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-02-11T20:56:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bfe9183fdcc0575a648d1401facc649888a1f49a'/>
<id>bfe9183fdcc0575a648d1401facc649888a1f49a</id>
<content type='text'>
Pull mailbox framework updates from Jassi Brar.

* 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
  mailbox: Add Altera mailbox driver
  mailbox: check for bit set before polling
  Mailbox: Fix return value check in pcc_init()
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull mailbox framework updates from Jassi Brar.

* 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
  mailbox: Add Altera mailbox driver
  mailbox: check for bit set before polling
  Mailbox: Fix return value check in pcc_init()
</pre>
</div>
</content>
</entry>
<entry>
<title>Mailbox: Fix return value check in pcc_init()</title>
<updated>2015-02-06T05:27:56+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2015-01-14T01:10:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=356d5d28f2cd45ee1956ee868de6f5d37bb9f7dd'/>
<id>356d5d28f2cd45ee1956ee868de6f5d37bb9f7dd</id>
<content type='text'>
In case of error, the function platform_create_bundle() returns
ERR_PTR() and never returns NULL. The NULL test in the return value
check should be replaced with IS_ERR().

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case of error, the function platform_create_bundle() returns
ERR_PTR() and never returns NULL. The NULL test in the return value
check should be replaced with IS_ERR().

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI / PCC: Use pr_debug() for debug messages in pcc_init()</title>
<updated>2015-02-04T23:40:08+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2015-02-04T23:40:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=efd756daf4ddae3cec2404c4e0b680b7cfdd6a45'/>
<id>efd756daf4ddae3cec2404c4e0b680b7cfdd6a45</id>
<content type='text'>
pcc_init() uses pr_err() to print two messages that are really debug
and not interesting to users.  Replace those pr_err() with pr_debug().

Reported-by: Cristian &lt;caravena@gmail.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pcc_init() uses pr_err() to print two messages that are really debug
and not interesting to users.  Replace those pr_err() with pr_debug().

Reported-by: Cristian &lt;caravena@gmail.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Mailbox: Add support for Platform Communication Channel</title>
<updated>2014-11-27T07:21:09+00:00</updated>
<author>
<name>Ashwin Chaugule</name>
<email>ashwin.chaugule@linaro.org</email>
</author>
<published>2014-11-13T00:59:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=86c22f8c9a3b71d42d38bfcd80372de72f573713'/>
<id>86c22f8c9a3b71d42d38bfcd80372de72f573713</id>
<content type='text'>
ACPI 5.0+ spec defines a generic mode of communication
between the OS and a platform such as the BMC. This medium
(PCC) is typically used by CPPC (ACPI CPU Performance management),
RAS (ACPI reliability protocol) and MPST (ACPI Memory power
states).

This patch adds PCC support as a Mailbox Controller. As of
ACPI v5.1 there is no provision for clients to lookup mailbox
controllers in a way that Linux expects. e.g. in DT the clients
can list the mailboxes they can associate with in the DT binding
and then provide a unique index to lookup a channel within a mailbox.
Since the ACPI spec doesn't have anything similar, we introduce a
mailbox controller specific API so that when the client calls it,
we know to lookup in the context of a specific controller. This
also helps in keeping a consistent interface across DT and ACPI
for such drivers.

This patch implements basic PCC support using the ACPI v5.1
structures. IRQ mode support will be provided as follow up patches.

Signed-off-by: Ashwin Chaugule &lt;ashwin.chaugule@linaro.org&gt;
Reviewed-by: Mark Brown &lt;broonie@kernel.org&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ACPI 5.0+ spec defines a generic mode of communication
between the OS and a platform such as the BMC. This medium
(PCC) is typically used by CPPC (ACPI CPU Performance management),
RAS (ACPI reliability protocol) and MPST (ACPI Memory power
states).

This patch adds PCC support as a Mailbox Controller. As of
ACPI v5.1 there is no provision for clients to lookup mailbox
controllers in a way that Linux expects. e.g. in DT the clients
can list the mailboxes they can associate with in the DT binding
and then provide a unique index to lookup a channel within a mailbox.
Since the ACPI spec doesn't have anything similar, we introduce a
mailbox controller specific API so that when the client calls it,
we know to lookup in the context of a specific controller. This
also helps in keeping a consistent interface across DT and ACPI
for such drivers.

This patch implements basic PCC support using the ACPI v5.1
structures. IRQ mode support will be provided as follow up patches.

Signed-off-by: Ashwin Chaugule &lt;ashwin.chaugule@linaro.org&gt;
Reviewed-by: Mark Brown &lt;broonie@kernel.org&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
