<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/firmware/arm_scmi, branch linux-5.6.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.6.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.6.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-12-30T12:34:37Z</updated>
<entry>
<title>drivers: firmware: scmi: Extend SCMI transport layer by trace events</title>
<updated>2019-12-30T12:34:37Z</updated>
<author>
<name>Lukasz Luba</name>
</author>
<published>2019-12-17T13:43:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=729d3530a50417a88f3f485ba2dc88ff8adfeacb'/>
<id>urn:sha1:729d3530a50417a88f3f485ba2dc88ff8adfeacb</id>
<content type='text'>
The SCMI transport layer communicates via mailboxes and shared memory with
firmware running on a microcontroller. It is platform specific how long it
takes to pass a SCMI message. The most sensitive requests are coming from
CPUFreq subsystem, which might be used by the scheduler.
Thus, there is a need to measure these delays and capture anomalies.
This change introduces trace events wrapped around transfer code.

According to Jim's suggestion a unique transfer_id is to distinguish
similar entries which might have the same message id, protocol id and
sequence. This is a case then there are some timeouts in transfers.

Suggested-by: Jim Quinlan &lt;james.quinlan@broadcom.com&gt;
Signed-off-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Skip protocol initialisation for additional devices</title>
<updated>2019-12-24T11:36:26Z</updated>
<author>
<name>Sudeep Holla</name>
</author>
<published>2019-11-07T11:39:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2deb267b26b5441e0e77f999ea084bf02c5c0ef1'/>
<id>urn:sha1:2deb267b26b5441e0e77f999ea084bf02c5c0ef1</id>
<content type='text'>
The scmi bus now supports adding multiple devices per protocol,
and since scmi_protocol_init is called for each scmi device created,
we must avoid allocating protocol private data and initialising the
protocol itself if it is already initialised.

In order to achieve the same, we can simple replace the idr pointer
from protocol initialisation function to a dummy function.

Suggested-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Reviewed-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Stash version in protocol init functions</title>
<updated>2019-12-24T11:35:49Z</updated>
<author>
<name>Sudeep Holla</name>
</author>
<published>2019-11-22T14:48:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b55b06b79445574fa031158fe2ae2946cde0d1b7'/>
<id>urn:sha1:b55b06b79445574fa031158fe2ae2946cde0d1b7</id>
<content type='text'>
In order to avoid querying the individual protocol versions multiple
time with more that one device created for each protocol, we can simple
store the copy in the protocol specific private data and use them whenever
required.

Reviewed-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Match scmi device by both name and protocol id</title>
<updated>2019-12-24T11:35:49Z</updated>
<author>
<name>Sudeep Holla</name>
</author>
<published>2019-11-06T17:55:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=50872a94637b1e7c92b43280adb71dd8e30fd246'/>
<id>urn:sha1:50872a94637b1e7c92b43280adb71dd8e30fd246</id>
<content type='text'>
The scmi bus now has support to match the driver with devices not only
based on their protocol id but also based on their device name if one is
available. This was added to cater the need to support multiple devices
and drivers for the same protocol.

Let us add the name "genpd" to scmi_device_id table in the driver so
that in matches only with device with the same name and protocol id
SCMI_PROTOCOL_POWER.

Reviewed-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Add versions and identifier attributes using dev_groups</title>
<updated>2019-12-24T11:35:49Z</updated>
<author>
<name>Sudeep Holla</name>
</author>
<published>2019-10-22T09:09:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4605e224db2ec4ce8f0eb4e91feba7eaf5677ba9'/>
<id>urn:sha1:4605e224db2ec4ce8f0eb4e91feba7eaf5677ba9</id>
<content type='text'>
Platform drivers now have the option to have the platform core create
and remove any needed sysfs attribute files. Using the same, let's add
the scmi firmware and protocol version attributes as well as vendor and
sub-vendor identifiers to sysfs.

It helps to identify the firmware details from the sysfs entries similar
to ARM SCPI implementation.

Reviewed-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Add names to scmi devices created</title>
<updated>2019-12-24T11:35:49Z</updated>
<author>
<name>Sudeep Holla</name>
</author>
<published>2019-11-06T15:17:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9c5c463f2adf140a126c7ab52bd10012c70fdd53'/>
<id>urn:sha1:9c5c463f2adf140a126c7ab52bd10012c70fdd53</id>
<content type='text'>
Now that scmi bus provides option to create named scmi device, let us
create the default devices with names. This will help to add names for
matching to respective drivers and eventually to add multiple devices
and drivers per protocol.

Reviewed-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Skip scmi mbox channel setup for addtional devices</title>
<updated>2019-12-24T11:35:49Z</updated>
<author>
<name>Sudeep Holla</name>
</author>
<published>2019-11-06T11:32:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=11040889afe3c0b084de0de1782534d529493e9b'/>
<id>urn:sha1:11040889afe3c0b084de0de1782534d529493e9b</id>
<content type='text'>
Now that the scmi bus supports adding multiple devices per protocol,
and since scmi_create_protocol_device calls scmi_mbox_chan_setup,
we must avoid allocating and initialising the mbox channel if it is
already initialised.

Reviewed-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Add support for multiple device per protocol</title>
<updated>2019-12-24T11:35:48Z</updated>
<author>
<name>Sudeep Holla</name>
</author>
<published>2018-12-21T18:08:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ee7a9c9f67c59008b330deff2762bd8cf1407eec'/>
<id>urn:sha1:ee7a9c9f67c59008b330deff2762bd8cf1407eec</id>
<content type='text'>
Currently only one scmi device is created for each protocol enumerated.
However, there is requirement to make use of some procotols by multiple
kernel subsystems/frameworks. One such example is SCMI PERFORMANCE
protocol which can be used by both cpufreq and devfreq drivers.
Similarly, SENSOR protocol may be used by hwmon and iio subsystems,
and POWER protocol may be used by genpd and regulator drivers.

In order to achieve that, let us extend the scmi bus to match based
not only protocol id but also the scmi device name if one is available.

Reviewed-by: Cristian Marussi &lt;cristian.marussi@arm.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Avoid double free in error flow</title>
<updated>2019-11-26T10:50:30Z</updated>
<author>
<name>Wen Yang</name>
</author>
<published>2019-11-25T15:54:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8305e90a894f82c278c17e51a28459deee78b263'/>
<id>urn:sha1:8305e90a894f82c278c17e51a28459deee78b263</id>
<content type='text'>
If device_register() fails, both put_device() and kfree() are called,
ending with a double free of the scmi_dev.

Calling kfree() is needed only when a failure happens between the
allocation of the scmi_dev and its registration, so move it to there
and remove it from the error flow.

Fixes: 46edb8d1322c ("firmware: arm_scmi: provide the mandatory device release callback")
Signed-off-by: Wen Yang &lt;wenyang@linux.alibaba.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
<entry>
<title>firmware: arm_scmi: Fix doorbell ring logic for !CONFIG_64BIT</title>
<updated>2019-11-14T11:13:50Z</updated>
<author>
<name>Sudeep Holla</name>
</author>
<published>2019-11-11T16:25:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7bd39bc6bfdf96f5df0f92199bbc1a3ee2f2adb8'/>
<id>urn:sha1:7bd39bc6bfdf96f5df0f92199bbc1a3ee2f2adb8</id>
<content type='text'>
The logic to ring the scmi performance fastchannel ignores the
value read from the doorbell register in case of !CONFIG_64BIT.
This bug also shows up as warning with '-Wunused-but-set-variable' gcc
flag:

drivers/firmware/arm_scmi/perf.c: In function scmi_perf_fc_ring_db:
drivers/firmware/arm_scmi/perf.c:323:7: warning: variable val set but
			not used [-Wunused-but-set-variable]

Fix the same by aligning the logic with CONFIG_64BIT as used in the
macro SCMI_PERF_FC_RING_DB().

Fixes: 823839571d76 ("firmware: arm_scmi: Make use SCMI v2.0 fastchannel for performance protocol")
Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Reported-by: Zheng Yongjun &lt;zhengyongjun3@huawei.com&gt;
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
</content>
</entry>
</feed>
