aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-04-01soc: mediatek: pm-domains: Add a power domain names for mt8192Enric Balletbo i Serra1-0/+21
Add the power domains names for the mt8192 SoC. Fixes: a49d5e7a89d6 ("soc: mediatek: pm-domains: Add support for mt8192") Signed-off-by: Enric Balletbo i Serra <[email protected]> Reviewed-by: Hsin-Yi Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
2021-04-01soc: mediatek: pm-domains: Add a power domain names for mt8183Enric Balletbo i Serra1-0/+15
Add the power domains names for the mt8183 SoC. This removes the debugfs errors like the following: debugfs: Directory 'power-domain' with parent 'pm_genpd' already present! Fixes: eb9fa767fbe1 ("soc: mediatek: pm-domains: Add support for mt8183") Signed-off-by: Enric Balletbo i Serra <[email protected]> Reviewed-by: Hsin-Yi Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
2021-04-01soc: mediatek: pm-domains: Add a meaningful power domain nameEnric Balletbo i Serra3-1/+17
Add the power domains names to the power domain struct so we have meaningful name for every power domain. This also removes the following debugfs error message. [ 2.242068] debugfs: Directory 'power-domain' with parent 'pm_genpd' already present! [ 2.249949] debugfs: Directory 'power-domain' with parent 'pm_genpd' already present! [ 2.257784] debugfs: Directory 'power-domain' with parent 'pm_genpd' already present! ... Fixes: 59b644b01cf4 ("soc: mediatek: Add MediaTek SCPSYS power domains") Signed-off-by: Enric Balletbo i Serra <[email protected]> Reviewed-by: Hsin-Yi Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
2021-04-01soc: mediatek: Make symbol 'mtk_mutex_driver' staticWei Yongjun1-1/+1
The sparse tool complains as follows: drivers/soc/mediatek/mtk-mutex.c:464:24: warning: symbol 'mtk_mutex_driver' was not declared. Should it be static? This symbol is not used outside of mtk-mutex.c, so this commit marks it static. Reported-by: Hulk Robot <[email protected]> Signed-off-by: Wei Yongjun <[email protected]> Reviewed-by: Chun-Kuang Hu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
2021-03-31soc: mediatek: mmsys: Add mt8183 mmsys routing tableHsin-Yi Wang2-0/+57
mt8183 has different routing registers than mt8173. Signed-off-by: Hsin-Yi Wang <[email protected]> Tested-by: Enric Balletbo i Serra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
2021-03-30firmware: arm_scmi: Add dynamic scmi devices creationCristian Marussi3-34/+311
Having added the support for SCMI protocols as modules in order to let vendors extend the SCMI core with their own additions it seems odd to then force SCMI drivers built on top to use a static device table to declare their devices since this way any new SCMI drivers addition would need the core SCMI device table to be updated too. Remove the static core device table and let SCMI drivers to simply declare which device/protocol pair they need at initialization time: the core will then take care to generate such devices dynamically during platform initialization or at module loading time, as long as the requested underlying protocol is defined in the devicetree. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30firmware: arm_scmi: Add protocol modularization supportCristian Marussi12-5/+55
Extend SCMI protocols accounting mechanism to address possible module usage and add the support to possibly define new protocols as loadable modules. Keep the standard protocols built into the SCMI core. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30firmware: arm_scmi: Rename non devres notify_opsCristian Marussi2-13/+13
Rename non devres managed notify_ops to use a naming pattern which exposes the performed action verb as last token. No functional change. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30firmware: arm_scmi: Make notify_priv really privateCristian Marussi4-33/+40
Notification private data is currently accessible via handle->notify_priv, this data was indeed meant to be private to the notification core support and not to be accessible by SCMI drivers. Make it private hiding it inside instance descriptor struct scmi_info and accessible only via dedicated helpers. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30firmware: arm_scmi: Cleanup events registration transient codeCristian Marussi7-41/+40
Remove all the events registration code used to ease the transition to the new interface based on protocol handles. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30firmware: arm_scmi: Cleanup unused core transfer helper wrappersCristian Marussi2-106/+0
Remove unused core scmi_xfer wrappers now that we have migrated all protocols to the new interface based on protocol handles. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30firmware: arm_scmi: Cleanup legacy protocol init codeCristian Marussi2-29/+2
Now that all protocols and drivers have been ported to the new interface based on protocol handles and get/put operations, remove all the legacy transient initialization code. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30firmware: arm_scmi: Make references to handle constCristian Marussi2-7/+7
Now that all the protocol private variable data have been moved out of struct scmi_handle, mark all of its references as const. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30firmware: arm_scmi: Remove legacy scmi_voltage_ops protocol interfaceCristian Marussi2-83/+0
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30regulator: scmi: Port driver to the new scmi_voltage_proto_ops interfaceCristian Marussi1-19/+23
Port the scmi regulator driver to the new SCMI voltage interface based on protocol handles and common devm_get_ops(). Link: https://lore.kernel.org/r/[email protected] Cc: Mark Brown <[email protected]> Tested-by: Florian Fainelli <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30firmware: arm_scmi: Port voltage protocol to new protocols interfaceCristian Marussi2-67/+136
Convert internals of protocol implementation to use protocol handles and expose a new protocol operations interface for SCMI driver using the new get/put common operations, while keeping the old handle->voltage_ops still around to ease transition. Remove handle->voltage_priv now unused. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30firmware: arm_scmi: Port systempower protocol to new protocols interfaceCristian Marussi2-17/+14
Convert internals of protocol implementation to use protocol handles and expose a new protocol operations interface for SCMI driver using the new get/put common operations. Remove handle->system_priv now unused. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30firmware: arm_scmi: Remove legacy scmi_sensor_ops protocol interfaceCristian Marussi2-101/+0
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30iio/scmi: Port driver to the new scmi_sensor_proto_ops interfaceCristian Marussi1-50/+50
Port the scmi iio driver to the new SCMI sensor interface based on protocol handles and common devm_get_ops(). Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Acked-by: Jyoti Bhayana <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30hwmon: (scmi) port driver to the new scmi_sensor_proto_ops interfaceCristian Marussi1-9/+15
Port the scmi hwmon driver to the new SCMI sensor interface based on protocol handles and common devm_get_ops(). Link: https://lore.kernel.org/r/[email protected] Cc: Guenter Roeck <[email protected]> Cc: Jean Delvare <[email protected]> Tested-by: Florian Fainelli <[email protected]> Acked-by: Guenter Roeck <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30firmware: arm_scmi: Port sensor protocol to new protocols interfaceCristian Marussi2-103/+194
Convert internals of protocol implementation to use protocol handles and expose a new protocol operations interface for SCMI driver using the new get/put common operations, while keeping the old handle->sensor_ops still around to ease transition. Remove handle->sensor_priv now unused. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30firmware: arm_scmi: Remove legacy scmi_reset_ops protocol interfaceCristian Marussi2-79/+0
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30reset: reset-scmi: Port driver to the new scmi_reset_proto_ops interfaceCristian Marussi1-13/+20
Port the scmi reset driver to the new SCMI reset interface based on protocol handles and common devm_get_ops(). Link: https://lore.kernel.org/r/[email protected] Cc: Philipp Zabel <[email protected]> Tested-by: Florian Fainelli <[email protected]> Acked-by: Philipp Zabel <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30firmware: arm_scmi: Port reset protocol to new protocols interfaceCristian Marussi2-57/+129
Convert internals of protocol implementation to use protocol handles and expose a new protocol operations interface for SCMI driver using the new get/put common operations, while keeping the old handle->reset_ops still around to ease transition. Remove handle->reset_priv now unused. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30firmware: arm_scmi: Remove legacy scmi_clk_ops protocol interfaceCristian Marussi2-82/+0
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30clk: scmi: Port driver to the new scmi_clk_proto_ops interfaceCristian Marussi1-10/+18
Port the scmi clock driver to the new SCMI clock interface based on protocol handles and common devm_get_ops(). Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Cc: Michael Turquette <[email protected]> Cc: Stephen Boyd <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Acked-by: Stephen Boyd <[email protected]> Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-30soc: mediatek: pwrap: add pwrap driver for MT6873/8192 SoCsHsin-Hsiung Wang1-0/+29
MT6873/8192 are highly integrated SoCs and use PMIC_MT6359 for power management. This patch adds pwrap master driver to access PMIC_MT6359. Signed-off-by: Hsin-Hsiung Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
2021-03-30dt-bindings: mediatek: add compatible for MT6873/8192 pwrapHsin-Hsiung Wang1-0/+1
This adds dt-binding documentation of pwrap for Mediatek MT6873/8192 SoCs Platform. Signed-off-by: Hsin-Hsiung Wang <[email protected]> Acked-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
2021-03-30soc: mediatek: pwrap: add arbiter capabilityHsin-Hsiung Wang1-13/+51
Add arbiter capability for pwrap driver. The arbiter capability uses new design to judge the priority and latency for multi-channel. The design with arbiter support cannot change the watchdog timer. This patch is preparing for adding mt6873/8192 pwrap support. Signed-off-by: Hsin-Hsiung Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
2021-03-30soc: mediatek: pwrap: use BIT() macroHsin-Hsiung Wang1-2/+2
Use a better BIT() marco for the bit definition. No functional changes, cleanup only. Signed-off-by: Hsin-Hsiung Wang <[email protected]> Reviewed-by: Nicolas Boichat <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
2021-03-30soc: mediatek: pm-domains: Fix missing error code in scpsys_add_subdomain()Enric Balletbo i Serra1-2/+3
Adding one power domain in scpsys_add_subdomain is missing to assign an error code when it fails. Fix that assigning an error code to 'ret', this also fixes the follwowing smatch warning. drivers/soc/mediatek/mtk-pm-domains.c:492 scpsys_add_subdomain() warn: missing error code 'ret' Fixes: dd65030295e2 ("soc: mediatek: pm-domains: Don't print an error if child domain is deferred") Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
2021-03-30soc: mediatek: mmsys: Use an array for setting the routing registersCK Hu2-248/+240
Actually, setting the registers for routing, use multiple 'if-else' for different routes, but this code would be more and more complicated while we support more and more SoCs. Change that and use a table per SoC so the code will be more portable and clear. Signed-off-by: CK Hu <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
2021-03-30soc: mediatek: mmsys: Create struct mtk_mmsys to store context dataCK Hu1-20/+27
Apart from the driver data, in order to extend the driver to support more and more SoCs, we will need to store other configuration data. So, create a mtk_mmsys struct to encapsulate all that information. Signed-off-by: CK Hu <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Reviewed-by: Chun-Kuang Hu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
2021-03-30tee: optee: do not check memref size on return from Secure WorldJerome Forissier1-10/+0
When Secure World returns, it may have changed the size attribute of the memory references passed as [in/out] parameters. The GlobalPlatform TEE Internal Core API specification does not restrict the values that this size can take. In particular, Secure World may increase the value to be larger than the size of the input buffer to indicate that it needs more. Therefore, the size check in optee_from_msg_param() is incorrect and needs to be removed. This fixes a number of failed test cases in the GlobalPlatform TEE Initial Configuratiom Test Suite v2_0_0_0-2017_06_09 when OP-TEE is compiled without dynamic shared memory support (CFG_CORE_DYN_SHM=n). Reviewed-by: Sumit Garg <[email protected]> Suggested-by: Jens Wiklander <[email protected]> Signed-off-by: Jerome Forissier <[email protected]> Signed-off-by: Jens Wiklander <[email protected]>
2021-03-30tee: optee: fix build error caused by recent optee tracepoints featureJisheng Zhang1-0/+3
If build kernel without "O=dir", below error will be seen: In file included from drivers/tee/optee/optee_trace.h:67, from drivers/tee/optee/call.c:18: ./include/trace/define_trace.h:95:42: fatal error: ./optee_trace.h: No such file or directory 95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | ^ compilation terminated. Fix it by adding below line to Makefile: CFLAGS_call.o := -I$(src) Tested with and without "O=dir", both can build successfully. Fixes: 0101947dbcc3 ("tee: optee: add invoke_fn tracepoints") Tested-by: Heiko Thiery <[email protected]> Tested-by: Guenter Roeck <[email protected]> Reported-by: Guenter Roeck <[email protected]> Suggested-by: Steven Rostedt <[email protected]> Signed-off-by: Jisheng Zhang <[email protected]> Signed-off-by: Jens Wiklander <[email protected]>
2021-03-29soc: qcom: address kernel-doc warningsLukas Bulwahn4-7/+7
The command: find ./include/linux/soc/qcom/ | xargs ./scripts/kernel-doc -none reports: ./include/linux/soc/qcom/qmi.h:26: warning: cannot understand function prototype: 'struct qmi_header ' ./include/linux/soc/qcom/qmi.h:101: warning: cannot understand function prototype: 'struct qmi_response_type_v01 ' ./include/linux/soc/qcom/irq.h:19: warning: expecting prototype for QCOM specific IRQ domain flags that distinguishes the handling of wakeup(). Prototype was for IRQ_DOMAIN_FLAG_QCOM_PDC_WAKEUP() instead ./include/linux/soc/qcom/apr.h:126: warning: Function parameter or member '__apr_driver' not described in 'module_apr_driver' ./include/linux/soc/qcom/apr.h:126: warning: Excess function parameter '__aprbus_driver' description in 'module_apr_driver' ./include/linux/soc/qcom/llcc-qcom.h:43: warning: cannot understand function prototype: 'struct llcc_slice_desc ' ./include/linux/soc/qcom/llcc-qcom.h:60: warning: cannot understand function prototype: 'struct llcc_edac_reg_data ' ./include/linux/soc/qcom/llcc-qcom.h:86: warning: cannot understand function prototype: 'struct llcc_drv_data ' Address all those warnings by: - prefixing kernel-doc descriptions for structs with the keyword 'struct', - turning a kernel-doc comment that does not follow the kernel-doc syntax into a normal comment, and - correcting a parameter name in a kernel-doc comment. Signed-off-by: Lukas Bulwahn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2021-03-29MAINTAINERS: add another entry for ARM/QUALCOMM SUPPORTLukas Bulwahn1-0/+1
The files in ./include/linux/soc/qcom/ are headers to the corresponding files in ./drivers/soc/qcom/, which are assigned to ARM/QUALCOMM SUPPORT. Possibly, the file pattern include/linux/*/qcom* intended to match this directory and its containing files, but unfortunately, it does not. Hence, add a file entry for this directory to ARM/QUALCOMM SUPPORT. Signed-off-by: Lukas Bulwahn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2021-03-29bus: qcom: Put child node before returnPan Bian1-1/+3
Put child node before return to fix potential reference count leak. Generally, the reference count of child is incremented and decremented automatically in the macro for_each_available_child_of_node() and should be decremented manually if the loop is broken in loop body. Reviewed-by: Linus Walleij <[email protected]> Fixes: 335a12754808 ("bus: qcom: add EBI2 driver") Signed-off-by: Pan Bian <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2021-03-29firmware: arm_scmi: Port clock protocol to new protocols interfaceCristian Marussi2-63/+139
Convert internals of protocol implementation to use protocol handles and expose a new protocol operations interface for SCMI driver using the new get/put common operations, while keeping the old handle->clk_ops still around to ease transition. Remove handle->clock_priv now unused. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-29firmware: arm_scmi: Remove legacy scmi_power_ops protocol interfaceCristian Marussi2-58/+0
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-29firmware: arm_scmi: Port genpd driver to the new scmi_power_proto_ops interfaceCristian Marussi1-10/+16
Port the scmi genpd driver to the new SCMI power interface based on protocol handles and common devm_get_ops(). Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-29firmware: arm_scmi: Port power protocol to new protocols interfaceCristian Marussi2-56/+105
Convert internals of protocol implementation to use protocol handles and expose a new protocol operations interface for SCMI driver using the new get/put common operations, while keeping the old handle->power_ops still around to ease transition. Remove handle->power_priv now unused. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-29firmware: arm_scmi: Remove legacy scmi_perf_ops protocol interfaceCristian Marussi2-147/+0
Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-29cpufreq: scmi: Port driver to the new scmi_perf_proto_ops interfaceCristian Marussi1-18/+21
Port driver to the new SCMI perf interface based on protocol handles and common devm_get_ops(). Link: https://lore.kernel.org/r/[email protected] Cc: Rafael J. Wysocki <[email protected]> Cc: Viresh Kumar <[email protected]> Tested-by: Florian Fainelli <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-29firmware: arm_scmi: Port perf protocol to new protocols interfaceCristian Marussi2-121/+258
Convert internals of protocol implementation to use protocol handles and expose a new protocol operations interface for SCMI driver using the new get/put common operations, while keeping the old handle->perf_ops still around to ease transition. Remove handle->perf_priv now unused. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-29firmware: arm_scmi: Port base protocol to new interfaceCristian Marussi3-63/+71
Port the SCMI base protocol to new protocol handles based interface. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-29firmware: arm_scmi: Add helper to access protocol revision/versionCristian Marussi2-0/+21
Add an helper to access from a protocol handle, the SCMI version data which is exposed on sysfs. Such helper will be needed by SCMI base protocol initialization once it will be moved to new protocol handles scheme. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-29firmware: arm_scmi: Add new protocol handle core transfer opsCristian Marussi2-36/+158
Add new core SCMI transfer operations based on protocol handles to enable protocols to builds and send their own protocol specific messages. Keep old original scmi_xfer_ operations interface as wrappers around the new interface in order to let coexist old and new interfaces to ease protocol by protocol migration. In order to support such migration the above wrappers and some additional transient code is also introduced in this commit. It will be later removed as a whole once the full migration of protocols and SCMI drivers will have been completed. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-29firmware: arm_scmi: Convert events registration to protocol handlesCristian Marussi9-28/+40
Convert all refactored events registration routines to use protocol handles. In order to maintain bisectability and to allow protocols and drivers to be later ported to the new protocol handle interface one by one, introduce here also some transient code that will be removed later in order to ease such transition. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2021-03-29firmware: arm_scmi: Refactor events registrationCristian Marussi10-75/+194
Add a new refactored protocol events registration helper and invoke it from the centralized initialization process triggered by get_ops() and friends. Also add a `get_num_sources` as a new optional callback amongst protocol events operations. Finally remove events registration call-sites from within the legacy protocol init routines. Link: https://lore.kernel.org/r/[email protected] Tested-by: Florian Fainelli <[email protected]> Signed-off-by: Cristian Marussi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>