summaryrefslogtreecommitdiff
path: root/drivers/firmware/arm_scpi.c
AgeCommit message (Collapse)Author
2016-06-21firmware: arm_scpi: add support for device power state managementSudeep Holla
SCPI protocol supports device power state management. This deals with power states of various peripheral devices in the system other than the core compute subsystem. This patch adds support for the power state management of those peripheral devices. Tested-by: Mathieu Poirier <mathieu.poirier@linaro.org> Tested-by: Jon Medhurst <tixy@linaro.org> Reviewed-by: Jon Medhurst <tixy@linaro.org> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2016-06-13firmware: arm_scpi: mark scpi_get_sensor_value as staticSudeep Holla
scpi_get_sensor_value like other scpi operations needs to be static. This patch marks it as static to be consistent with others. Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2016-06-13firmware: arm_scpi: remove dvfs_get packed structureSudeep Holla
dvfs_get packed structure is used to read the DVFS/OPP index from the firmware. It just contains a single byte that needs no packing making the whole structure defination unnecessary. This patch replaces the unnecessary dvfs_get packed structure with an unsigned byte. Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2016-02-16firmware: arm_scpi: add support for 64-bit sensor valuesSudeep Holla
SCPI specification version 1.1 extended the sensor from 32-bit to 64-bit values in order to accommodate new sensor class with 64-bit requirements Since the SCPI driver sets the higher 32-bit for older protocol version to zeros, there's no need to explicitly check the SCPI protocol version and the backward compatibility is maintainted. Acked-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Punit Agrawal <punit.agrawal@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2016-02-16firmware: arm_scpi: decrease Tx timeout to 20msSudeep Holla
Currently we have Tx timeout of 50ms while Rx timeout of 20 ms. Tx state machine is maintained by the mailbox framework and Rx by SCPI driver. It is possible that before msg_submit call tx_prepare(because of other message in the queue and the channel being active), wait for completion in scpi_send_message times out and the buffers are freed. In that case when Tx state machine timer goes off later, poll_txdone calls scpi_tx_prepare on that message, which adds it to the rx_pending list, corrupting link pointers. This patch reduces the Tx timeout to 20ms and increases Rx timeout to 30ms to avoid the above mentioned issue. Reported-by: Jon Medhurst (Tixy) <tixy@linaro.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2016-02-16firmware: arm_scpi: fix send_message and sensor_get_value for big-endianSudeep Holla
scpi_process_cmd converts the status word from little endian to cpu endianness. However scpi_send_message again does the conversion which is wrong and shows up as a bug only when running in big-endian kernel. Similarly scpi_sensor_get_value passes the sensor index in the cpu endianness to SCP which results in SCPI_ERR_RANGE in big-endian mode. This patch fixes the above mentioned issue for big-endian kernel. Acked-by: Punit Agrawal <punit.agrawal@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2015-10-09firmware: arm_scpi: Extend to support sensorsPunit Agrawal
ARM System Control Processor (SCP) provides an API to query and use the sensors available in the system. Extend the SCPI driver to support sensor messages. Signed-off-by: Punit Agrawal <punit.agrawal@arm.com> Acked-by: Sudeep Holla <sudeep.holla@arm.com>
2015-09-28firmware: add support for ARM System Control and Power Interface(SCPI) protocolSudeep Holla
This patch adds support for System Control and Power Interface (SCPI) Message Protocol used between the Application Cores(AP) and the System Control Processor(SCP). The MHU peripheral provides a mechanism for inter-processor communication between SCP's M3 processor and AP. SCP offers control and management of the core/cluster power states, various power domain DVFS including the core/cluster, certain system clocks configuration, thermal sensors and many others. This protocol driver provides interface for all the client drivers using SCPI to make use of the features offered by the SCP. Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Reviewed-by: Jon Medhurst (Tixy) <tixy@linaro.org> Cc: Jassi Brar <jassisinghbrar@gmail.com> Cc: Liviu Dudau <Liviu.Dudau@arm.com> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>