- 23 2月, 2018 12 次提交
-
-
由 Heiner Kallweit 提交于
On legacy pre-1.0 firmware versions so far the following message is printed which may cause some confusion: SCP Protocol 0.0 Firmware 0.0.0 version Therefore replace the message with the following if firmware doesn't provide usable version information: SCP Protocol legacy pre-1.0 firmware Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Heiner Kallweit 提交于
Macro definitions can be simplified by making use of the FIELD_GET/_PREP bitfield macros. Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Heiner Kallweit 提交于
One more single-element struct was left, remove it. Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Heiner Kallweit 提交于
At several positions in the code sparse complains about incorrect access to __iomem annotated memory. Fix this and make sparse happy. Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> [Sudeep Holla: changed the patch title to describe the change] Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Sudeep Holla 提交于
Both clk_get_value and sensor_value structures contains a single element and hence needs no packing making the whole structure defination unnecessary. This patch gets rid of both those unnecessary structures. Tested-by: NKevin Hilman <khilman@baylibre.com> Reviewed-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Sudeep Holla 提交于
This patch drops the only present type cast of the SCPI payload pointer to scpi_shared_mem inorder to align with other occurrences, IOW for consistency. Tested-by: NKevin Hilman <khilman@baylibre.com> Reviewed-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Heiner Kallweit 提交于
lo_val and hi_val together in this order are a little endian 64 bit value. Therefore we can simplify struct sensor_value and the code by defining it as a __le64 value and by using le64_to_cpu. Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Heiner Kallweit 提交于
By using FIELD_GET and proper masks we can avoid quite some shifting and masking macro magic and make the code better readable. Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Heiner Kallweit 提交于
Making the header subfields members of struct dvfs_info allows to make the code better readable and avoids some macro magic. In addition remove a useless statement using info->latency. Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Heiner Kallweit 提交于
Replace two remaining functions in probe with their devm versions. Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Heiner Kallweit 提交于
Make freeing the mbox channels device-managed, thus further simplifying scpi_remove and and one further step to get rid of scpi_remove. Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Heiner Kallweit 提交于
Both memory areas are free'd anyway when the device is destroyed, so we don't have to do it manually. Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
- 04 12月, 2017 1 次提交
-
-
由 Olof Johansson 提交于
Revert "Merge tag 'scpi-updates-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/drivers" Paraphrased from email from Kevin Hilman: Revert ARM SCPI changes since v4.14. Untested changes caused regressions in SCPI and CPUfreq/DVFS failures on most Amlogic SoCs. Changes reverted for v4.15 so they can be better reviewed and tested. These ARM SCPI changes caused SCPI regressions resulting in CPUfreq failures on most Amlogic SoCs (found by kernelci.org.) Unfortunately, this was not caught in linux-next due to other bugs/panics on these platforms masking this problem so we've only found it since we've fixed the other issues. Since we're already in the -rc cycle, I'd prefer to revert to a known working state (that of v4.14) rather than finding/reverting a subset, which would just lead to another untested state. These changes can then have some time to be better reviewed and tested and resubmitted for v4.16. Kevin Hilman has tested this revert on the affected Amlogic SoCs and verified that we're back to the previous (working) condition. This reverts commit 6710acf2, reversing changes made to 4b367f2e. Reported-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NOlof Johansson <olof@lixom.net>
-
- 09 10月, 2017 3 次提交
-
-
由 Heiner Kallweit 提交于
At several positions in the code sparse complains about incorrect access to __iomem annotated memory. Fix this and make sparse happy. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Sudeep Holla 提交于
Both clk_get_value and sensor_value structures contains a single element and hence needs no packing making the whole structure defination unnecessary. This patch gets rid of both those unnecessary structures. Reviewed-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Sudeep Holla 提交于
This patch drops the only present type cast of the SCPI payload pointer to scpi_shared_mem inorder to align with other occurrences, IOW for consistency. Reviewed-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
- 05 10月, 2017 3 次提交
-
-
由 Heiner Kallweit 提交于
lo_val and hi_val together in this order are a little endian 64 bit value. Therefore we can simplify struct sensor_value and the code by defining it as a __le64 value and by using le64_to_cpu. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Heiner Kallweit 提交于
By using FIELD_GET and proper masks we can avoid quite some shifting and masking macro magic and make the code better readable. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Heiner Kallweit 提交于
Making the header subfields members of struct dvfs_info allows to make the code better readable and avoids some macro magic. In addition remove a useless statement using info->latency. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
- 04 10月, 2017 5 次提交
-
-
由 Heiner Kallweit 提交于
sysfs_create_groups and of_platform_populate can be replaced with the device-managed versions what allows us to remove scpi_remove. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Heiner Kallweit 提交于
Make freeing the mbox channels device-managed, thus further simplifying scpi_remove and and one further step to get rid of scpi_remove. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Heiner Kallweit 提交于
Pre-populating the dvfs info data in scpi_probe allows to make all memory allocations device-managed. This helps to simplify scpi_remove and eventually to get rid of scpi_remove completely. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> [sudeep.holla: changed to continue probe even if scpi_dvfs_populate_info fails] Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Heiner Kallweit 提交于
Both memory areas are free'd anyway when the device is destroyed, so we don't have to do it manually. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Heiner Kallweit 提交于
There's no benefit using drvdata as variable scpi_info is global. Setting scpi_info to NULL in scpi_remove isn't needed too. If arm_scpi is built-in, then this code is never used. And if arm_scpi is built as a module and some other module calls get_scpi_ops() then due to this dependency scpi_remove is called only after the other module has been removed. Last but not least, users usually store the result of get_scpi_ops(), therefore setting scpi_info to NULL wouldn't really help. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> [sudeep.holla: reworded the commit log a bit] Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
- 23 8月, 2017 1 次提交
-
-
由 Sudeep Holla 提交于
scpi_device_{g,s}et_power_state correctly handles the conversion of endianness for dev_id using cpu_to_le16. However dev_id is declared as u16 in struct dev_pstate_set which is incorrect. This patch fixes the endianness of dev_id in dev_pstate_set structure. Fixes: 37a441dc ("firmware: arm_scpi: add support for device power state management") Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
- 16 8月, 2017 1 次提交
-
-
由 Rob Herring 提交于
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: NRob Herring <robh@kernel.org> Acked-by: NSudeep Holla <sudeep.holla@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: NArnd Bergmann <arnd@arndb.de>
-
- 05 6月, 2017 1 次提交
-
-
由 Sudeep Holla 提交于
Currently only CPU devices use the transition latency and the OPPs populated in the SCPI driver. scpi-cpufreq has logic to handle these. However, even GPU and other users of SCPI DVFS will need the same logic. In order to avoid duplication, this patch adds support to get DVFS transition latency and add all the OPPs to the device using OPP library helper functions. The helper functions added here can be used for any device whose DVFS are managed by SCPI. Also, we also have incorrect dependency on the cluster identifier for the CPUs. It's fundamentally wrong as the domain id need not match the cluster id. This patch gets rid of that dependency by making use of the clock bindings which are already in place. Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
- 31 3月, 2017 1 次提交
-
-
由 Alexey Klimov 提交于
Instead of performing full initialization of the completion structure on each transfer in scpi_send_message(), we initialize it at boot time (more specifically, in the relevant probe() function) and use reinit_completion() to reset ->done counter on each message transfer. Signed-off-by: NAlexey Klimov <alexey.klimov@arm.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
- 30 12月, 2016 1 次提交
-
-
由 Martin Blumenstingl 提交于
The pre-1.0 SCPI firmwares are using single __le32 as sensor value, while the SCPI v1.0 protocol uses two __le32 as sensor values(64bit) split into 32bit upper and 32bit lower value. Using an "struct sensor_value" to read the sensor value on a pre-1.0 SCPI firmware gives garbage in the "hi_val" field. This patch fixes the issue by reading only the lower 32-bit value for all pre-1.0 SCPI versions. Suggested-by: NSudeep Holla <Sudeep.Holla@arm.com> Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> [sudeep.holla@arm.com: updated the commit log to reflect the implementation] Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
- 18 11月, 2016 1 次提交
-
-
由 Sudeep Holla 提交于
This patch adds new DT match table to setup the support for SCPI protocol versions prior to v1.0 releases. It also adds "arm,scpi-pre-1.0" to the SCPI match entry. Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
- 02 11月, 2016 3 次提交
-
-
由 Neil Armstrong 提交于
On Amlogic SCPI legacy implementation, the GET_CAPABILITIES command is not supported, failover by using 0.0.0 version. Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> [sudeep.holla@arm.com: changed the subject] Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Neil Armstrong 提交于
This patch adds support for the Legacy SCPI protocol that is available in very early JUNO versions and shipped Amlogic ARMv8 based SoCs. Some Rockchip SoC are also known to use this version of protocol with extended vendor commands. In order to support the legacy SCPI protocol variant, we need to add the structures and macros definitions that varies against the final SCPI v1.0 specification. We add the indirection table for legacy commands set so that it can co-exist with the standard v1.0 command set. It also adds bitmap field for channel selection since the legacy protocol mandates to send only selected subset of the commands on the high priority channel. Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> [sudeep.holla@arm.com: Updated the changelog] Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Neil Armstrong 提交于
Since Amlogic SoCs supports more than 8 OPPs per domains, we need increase the OPP structure size. This patch increases the MAX_DVFS_OPPS to 16. Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
- 17 10月, 2016 1 次提交
-
-
由 Sudeep Holla 提交于
Since the legacy SCPI and the SCPI v1.0 differ in the command values, it's better to create some sort of command indirection in the driver to avoid repeated version check at multiple places. This patch adds the indirection command table to allow different values of the command across SCPI versions. [narmstrong@baylibre.com: added cmd check in scpi_send_message] Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
- 08 8月, 2016 1 次提交
-
-
由 Peter Chen 提交于
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using it. Besides, of_address_to_resource always returns -EINVAL for error, delete the assignment for ret. Signed-off-by: NPeter Chen <peter.chen@nxp.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
- 21 6月, 2016 1 次提交
-
-
由 Sudeep 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: NMathieu Poirier <mathieu.poirier@linaro.org> Tested-by: NJon Medhurst <tixy@linaro.org> Reviewed-by: NJon Medhurst <tixy@linaro.org> Reviewed-by: NKevin Hilman <khilman@baylibre.com> Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
- 13 6月, 2016 2 次提交
-
-
由 Sudeep 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: NSudeep Holla <sudeep.holla@arm.com> -
由 Sudeep 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: NSudeep Holla <sudeep.holla@arm.com>
-
- 16 2月, 2016 2 次提交
-
-
由 Sudeep 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: NGuenter Roeck <linux@roeck-us.net> Reviewed-by: NPunit Agrawal <punit.agrawal@arm.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Sudeep 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: NJon Medhurst (Tixy) <tixy@linaro.org> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-