Commit graph

3468 commits

Author SHA1 Message Date
Arnd Bergmann 57e06f8c1f Qualcomm driver updates for v6.7
This introduces partial support for the Qualcomm Secure Execution
 Environment SCM interface, and uses this to implement EFI variable
 access on the Windows On Snapdragon devices (for now).
 
 The 32/64-bit calling convention detector of the SCM interface is
 updated to not choose 64-bit convention when Linux is 32-bit. The
 "extern" specifier is dropped from the interface include file.
 
 The LLCC driver gains support for carrying configuration for multiple
 different system/DDR configurations for a given platform, and selecting
 between them. Support for Q[DR]U1000 is added to the driver.
 
 All exported symbols are transitioned to EXPORT_SYMBOL_GPL().
 
 The platform_drivers in the Qualcomm SoC are transitioned to the
 void-returning remove_new implementation.
 
 The rmtfs memory driver gains support for leaving guard pages around the
 used area, to avoid issues if the allocation happens to be placed
 adjacent to another protected memory region.
 
 The socinfo driver gains knowledge about IPQ8174, QCM6490, SM7150P and
 various PMICs used together with SM8550.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmUsTdwVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FffsQAMcY5NKBZqbQu5wNr2zPnKW5m/30
 lYi4bW42mlY6Mo3h97LLxjGM9bqsmPasfAxv/84viN0JYxrSVye/zNtD35qTQBtu
 t8O8vdOaOYXIc8dwqC16Fl0kI5pm9tl7p5SJmGAUZBvIGUIGngy3gZOYM+HzyMQr
 UXFO6dO0tQvjowd1t0xE51UNm4J79Vm8HjtuR1pc4i+fZhsy5XhZYq9e4531Yc7o
 lNacBugjXhurw/rz0odNuRzKn+He+7KQR/hSNv8B2MbH0ZUP+k4VUaRSD9TZyBgC
 cOahbCfVLkGwepPFGuaaJUUgo8/aa4HiAbdyOrNL2ozYkoLv/PbRrLF0R9KgXK5v
 LPXpqXt97+rWPnq2iPrfZlo4LAj6JVSCUCxIRZFcWyDFv+wHsYuRbO64s1+MC7+M
 CPpvup31PLGCeR9Joo/WTt9iAUPJ4BY9v4mk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KsUUSVEODyUng=
 =7XXT
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-for-6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers

Qualcomm driver updates for v6.7

This introduces partial support for the Qualcomm Secure Execution
Environment SCM interface, and uses this to implement EFI variable
access on the Windows On Snapdragon devices (for now).

The 32/64-bit calling convention detector of the SCM interface is
updated to not choose 64-bit convention when Linux is 32-bit. The
"extern" specifier is dropped from the interface include file.

The LLCC driver gains support for carrying configuration for multiple
different system/DDR configurations for a given platform, and selecting
between them. Support for Q[DR]U1000 is added to the driver.

All exported symbols are transitioned to EXPORT_SYMBOL_GPL().

The platform_drivers in the Qualcomm SoC are transitioned to the
void-returning remove_new implementation.

The rmtfs memory driver gains support for leaving guard pages around the
used area, to avoid issues if the allocation happens to be placed
adjacent to another protected memory region.

The socinfo driver gains knowledge about IPQ8174, QCM6490, SM7150P and
various PMICs used together with SM8550.

* tag 'qcom-drivers-for-6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (44 commits)
  soc: qcom: socinfo: Convert to platform remove callback returning void
  soc: qcom: smsm: Convert to platform remove callback returning void
  soc: qcom: smp2p: Convert to platform remove callback returning void
  soc: qcom: smem: Convert to platform remove callback returning void
  soc: qcom: rmtfs_mem: Convert to platform remove callback returning void
  soc: qcom: qcom_stats: Convert to platform remove callback returning void
  soc: qcom: qcom_gsbi: Convert to platform remove callback returning void
  soc: qcom: qcom_aoss: Convert to platform remove callback returning void
  soc: qcom: pmic_glink: Convert to platform remove callback returning void
  soc: qcom: ocmem: Convert to platform remove callback returning void
  soc: qcom: llcc-qcom: Convert to platform remove callback returning void
  soc: qcom: icc-bwmon: Convert to platform remove callback returning void
  firmware: qcom_scm: use 64-bit calling convention only when client is 64-bit
  soc: qcom: llcc: Handle a second device without data corruption
  soc: qcom: Switch to EXPORT_SYMBOL_GPL()
  soc: qcom: smem: Annotate struct qcom_smem with __counted_by
  soc: qcom: rmtfs: Support discarding guard pages
  dt-bindings: reserved-memory: rmtfs: Allow guard pages
  dt-bindings: firmware: qcom,scm: document IPQ5018 compatible
  firmware: qcom_scm: disable SDI if required
  ...

Link: https://lore.kernel.org/r/20231015204014.855672-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-18 17:18:02 +02:00
Arnd Bergmann 15c46d85f0 Amlogic drivers changes for v6.7:
- correct meson_sm_* API retval handling
 - Use device_get_match_data() in meson SM
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmUs83IACgkQd9zb2sjI
 SdFGzw//VNykb/lkcMbPSG9FB0q5rUHfZqiqn9OEdd8rk2ygUzHSbjxSl91rJYJl
 LnmtoB1I0ojJbkwYxPDsvpJrd5TaDS2nRhzxtk4PfZVn6SbHA1gEXlYAi1sgOpa7
 G0wJ2jNT+jocS5868UyZCiOojxhD3TKsSCtPk7qvb9ywRBq4lKW5Ci6HIJHxcwL+
 AzhozwO8vio93oSRd72GXlH48HpL4MR7GWyYl483rGEQIM5LvhNP0CWUMoRmPRqr
 WtwiXsH7uth8l5mCxSb5HTdFTLFcFh301UgXovFDg+qudK8Kk8fspX+KQJt/Rpo1
 vyEI/Hc2PeEFUz2pHPOGVdeo8cPjN0Kph2jeT/s8B9UYSUFxPoRfESea68g6/gHt
 TQuuu+Nfy0FVJAVOwq24aAzxQ3bETCmEvVcGQhNfXINTMpEZZmr75jeq7j5PJVuY
 +b7KEqY9PzJIThGimZknbbrjEpeSvF+5w+/Ao7KhSh1ezuGgHQ5Pxt3T2SVwsKq7
 zlzXTupfqNu6Jcd7gpFQARWv2qOXTZha71eG+sAjXtmz3TglSZc8S2bJg9CD0VSI
 O0nBggXNKoAmCLZFcX2Dvvvj47WBqX2AP530dQUT0ZjO8Wh9Duf9cSAdgOI98/TD
 IIaW9QXpTYeD9I9zmMsQ2zKZpHpMMvM9DUZ87ocmYgC/AcpguLs=
 =EiNc
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUtpKwACgkQYKtH/8kJ
 UieslhAAvIqH0Tx7Lsu2XPP41UbYB3Wxa0uFSGGYihrkA8/ZrmZ7a+xzGvL131fu
 +Y/KA+g6uHVct3kPTvq6wry8gJI48JMGlVzAGalH+66PuPr7FYv+ZQVs2GVcBuB7
 c5Lv0Nbu/7LVMuTf/sKcoSRwx8w4nKpL7UGZVb46uGM4z41abdzzcb3+K95vUZ4M
 HaCiFbrBtEIZl1YXSsOWat7K5gvyVQQ9TFamD6HEmq2MRXRubvAueX0w/Z/fydaR
 0l1vIfTadRf4YIDLuBkXieKAsYwQ2ShAiC2/oRgBc7+Rg9BDoh3MFW8TTu36nGFM
 Ufe845X1JrUl6r2J0hYAU4qb7nwpNQmXZuUeyBNPYXw+Ovsy8fWWqZ9MB8XCdkag
 yGweDUcp/KAMHafVLWEI18Jjy5oYHoLsG5geQeyerIhbTpx834RC8mpVYe5kAiXA
 D99dYa2dIzpgo5OShx/Q62vW7OK8/RLXs71V2+WrmyvWjlQMFWYIKAE1Tt9pRc5K
 hIVKAzioMQM9kh3J0t6MZhtvqe9A9in4P3knS+91MH6TiQcwqj5IoyVtHNt5g+Ed
 EjuZa9rK1sqwjUT4uJfmiHrW9AY4RrSB9Bz1mr8NmSbv53cUqcDcBf55RMVS48Fi
 i6v7IKWBloPl27ixHZRi2xbWBOzvWUqopiTYRE2g1W2bw/j3XUs=
 =C6PQ
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-drivers-for-v6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/drivers

Amlogic drivers changes for v6.7:
- correct meson_sm_* API retval handling
- Use device_get_match_data() in meson SM

* tag 'amlogic-drivers-for-v6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
  firmware: meson: Use device_get_match_data()
  drivers: meson: sm: correct meson_sm_* API retval handling

Link: https://lore.kernel.org/r/00ef6ab3-59c1-484a-9d70-50f16e4cc584@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-16 23:01:32 +02:00
Arnd Bergmann 9e6e423a36 firmware: tegra: Changes for v6.7-rc1
Contains a typofix and a new mechanism to help fix an issue that can
 seemingly hang the system during early resume.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmUpXfwTHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoWNFD/9+VDQK/PYAwD1DIdClul7lLftD/To3
 5zCi5tt7BD8HVhOci4IF89j0qOG09SNUg9rIOY6zg/9L3XopuWMZIHMPsJK0T9PR
 j7VgvD181OC/o6W3GZiTYgNXndkz7G+vf9cSJrc5V1sypa74dkqS2Wkjrdq03u8j
 AybYdga2BwJXPyCFuV74ORsRPy1BQjK/uPlh+vNwY9FF2hZ9WWATG1D8dF1guOXa
 W8z7aubvmAUHhWKY54dSYHkH3mgW1+B8AdK2KIm/ijw2Mfol/iA67mb7qvKjL2RU
 h+y2IMoQGvYOiDKUdjSKe//Ve8elhAOCJ+VriZENCOTTs6EJl5otXC/6lzPpnX9A
 Z3Sz41su+riIPfLvXTryxbCDOFWvMqp6z7ANBMFXawzqMOPct0ZwD1F9EnLzuuSC
 KpyzPSnjo5afUk3u/pJaShKtPUhVbZ1yzrhbC+bMQpb1iKm/88439eQvARtC0f9Z
 tS7fOeJEOQ+AoNGFzn4clHskfqsF+OluWV2uH+zGGiejtcRU5Q3t0+7ILNjrPeFg
 j4OeKvR+8npk3VP+ItOry6ACZA7S5ieUXN7msWCGIbPRq7TJQCdsov78NLJy5MkF
 pjWPDQ3f8dD0DW0WPBYUbdgrwCREjNHf60dZlfJWvTtKX73XLrxcXvAz57vcIB2v
 VybNWRmtcXBI8w==
 =IXob
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUto+0ACgkQYKtH/8kJ
 UicJ7RAAs97iG93u8Mmx3nS9u5VB1KKm+Z7BiDkEMrULIRcZ3PqlCydBCa7klAWG
 x0gsE4KR5t9q2Iwy0TPponGCw3OD0WiiERz8BGDyJLw/y4Th1ZWDClq2OIbDT4Dr
 NiExqGWNvpE7myrYjY4NHBoqsnMvyMvzNWRDcI4hL51YLHM1CZbqYrK+NROo1Zg2
 o+hzi+Qwx0fKUGUgfcqwJkwn3FabbOBelnOxSkd97dznf49fCdQwJcSKRndtE6RM
 LrosR6aNAwios/0PYXzhcIwjfJyLeW/FoY5AfGbFR91xwukmZPhGhhHY5XPHYJAq
 lUlVl1IYDTH+vVAcq7GlltIvXBbzUPuAnh1iWffDv5OLA4ghjNiToI8N3lP1AmrL
 dkAy67VkIMKBYBxqxgujYI/2TRmzlGa9IEL5nTKs7pFcDGfEoUHPS9FZO8G+NH4w
 L+kNGAD8GEwytaXSVPVx9Cmoy8u859USpWGs9198GXlZwrFrjSJ20IB30qrDIEyK
 uAp9Yzkeh/FgkOPwepRK99XIkgQOcnqQldP/Q+8ItLldugWIgowQEZCcBRMxJa/8
 q61s+w5LcXHJB2lux6TaztLXfhnetoNmUUrbJjj0gOnxOn43rrDhGnv6yFHwFFec
 L4o48PWAva/dOqCmIK4Vuvy3FSsgUyHkY4BXz4IE2LFSApBGYeY=
 =r80j
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-6.7-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers

firmware: tegra: Changes for v6.7-rc1

Contains a typofix and a new mechanism to help fix an issue that can
seemingly hang the system during early resume.

* tag 'tegra-for-6.7-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  firmware: tegra: Add suspend hook and reset BPMP IPC early on resume
  firmware: tegra: Fix a typo

Link: https://lore.kernel.org/r/20231013153723.1729109-2-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-16 22:58:21 +02:00
Arnd Bergmann d3cd3b5501 Arm FF-A updates for v6.7
The main addition is the initial support for the notifications and
 memory transaction descriptor changes added in FF-A v1.1 specification.
 
 The notification mechanism enables a requester/sender endpoint to notify
 a service provider/receiver endpoint about an event with non-blocking
 semantics. A notification is akin to the doorbell between two endpoints
 in a communication protocol that is based upon the doorbell/mailbox
 mechanism.
 
 The framework is responsible for the delivery of the notification from
 the ender to the receiver without blocking the sender. The receiver
 endpoint relies on the OS scheduler for allocation of CPU cycles to
 handle a notification.
 
 OS is referred as the receiver’s scheduler in the context of notifications.
 The framework is responsible for informing the receiver’s scheduler that
 the receiver must be run since it has a pending notification.
 
 The series also includes support for the new format of memory transaction
 descriptors introduced in v1.1 specification.
 
 Apart from the main additions, it includes minor fixes to re-enable FF-A
 drivers usage of 32bit mode of messaging and kernel warning due to the
 missing assignment of IDR allocation ID to the FFA device. It also adds
 emitting 'modalias' to the base attribute of FF-A devices.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmUlJuUACgkQAEG6vDF+
 4pinPRAAzLFtehLNhpC2BsEbvdJo/bSeGl1OAricml3gyU45W7AamAPuplA9E871
 GxXMYbH5+mnqz5cHaYBb8KGm5dRENrtKgrwMITg3jOlqdz9HWy2MLgbSmvqbXNsU
 5O8iZDvFOTCMLSEI6gWnaiKRpAzDSFu0/FH86xv+9+pbjmjL3iDjFlbxbGLFYk+L
 gqHLdx4iW6aD6geC2n8oDO6UWCNLaHpXaJSAE6pfh/7pkuKMWYjVwivKxrMA9Saw
 WjoyBdjUgir9w6qJauR94MGMnbPTd378MzBrEWMo04I2ubLCVwiPVDEEu7jZGrBV
 2n5DD8/0fSak9KEEozRKnj9umhmvHN9Of72qBLNZ0K4zmq8Fs00woXIlnUNH0dcZ
 qZN/ZEDXpD51OsgMH+ojojaqFEcFynEQIQjibiv1Ju16F+1P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=
 =QaJo
 -----END PGP SIGNATURE-----

Merge tag 'ffa-updates-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers

Arm FF-A updates for v6.7

The main addition is the initial support for the notifications and
memory transaction descriptor changes added in FF-A v1.1 specification.

The notification mechanism enables a requester/sender endpoint to notify
a service provider/receiver endpoint about an event with non-blocking
semantics. A notification is akin to the doorbell between two endpoints
in a communication protocol that is based upon the doorbell/mailbox
mechanism.

The framework is responsible for the delivery of the notification from
the ender to the receiver without blocking the sender. The receiver
endpoint relies on the OS scheduler for allocation of CPU cycles to
handle a notification.

OS is referred as the receiver’s scheduler in the context of notifications.
The framework is responsible for informing the receiver’s scheduler that
the receiver must be run since it has a pending notification.

The series also includes support for the new format of memory transaction
descriptors introduced in v1.1 specification.

Apart from the main additions, it includes minor fixes to re-enable FF-A
drivers usage of 32bit mode of messaging and kernel warning due to the
missing assignment of IDR allocation ID to the FFA device. It also adds
emitting 'modalias' to the base attribute of FF-A devices.

* tag 'ffa-updates-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_ffa: Upgrade the driver version to v1.1
  firmware: arm_ffa: Update memory descriptor to support v1.1 format
  firmware: arm_ffa: Switch to using ffa_mem_desc_offset() accessor
  KVM: arm64: FFA: Remove access of endpoint memory access descriptor array
  firmware: arm_ffa: Simplify the computation of transmit and fragment length
  firmware: arm_ffa: Add notification handling mechanism
  firmware: arm_ffa: Add interface to send a notification to a given partition
  firmware: arm_ffa: Add interfaces to request notification callbacks
  firmware: arm_ffa: Add schedule receiver callback mechanism
  firmware: arm_ffa: Initial support for scheduler receiver interrupt
  firmware: arm_ffa: Implement the NOTIFICATION_INFO_GET interface
  firmware: arm_ffa: Implement the FFA_NOTIFICATION_GET interface
  firmware: arm_ffa: Implement the FFA_NOTIFICATION_SET interface
  firmware: arm_ffa: Implement the FFA_RUN interface
  firmware: arm_ffa: Implement the notification bind and unbind interface
  firmware: arm_ffa: Implement notification bitmap create and destroy interfaces
  firmware: arm_ffa: Update the FF-A command list with v1.1 additions
  firmware: arm_ffa: Emit modalias for FF-A devices
  firmware: arm_ffa: Allow the FF-A drivers to use 32bit mode of messaging
  firmware: arm_ffa: Assign the missing IDR allocation ID to the FFA device

Link: https://lore.kernel.org/r/20231010124354.1620064-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-16 22:55:57 +02:00
Arnd Bergmann d1debb7b32 Arm SCMI updates for v6.7
Main additions this time include:
 
 1. SCMI v3.2 clock configuration support:
    This helps to retrieve the enabled state of a clock as well as allow
    to set OEM specific clock configurations.
 
 2. Support for generic performance scaling(DVFS):
    The current SCMI DVFS support is limited to the CPUs in the kernel.
    This extension enables it to used for all kind of devices and not
    only for the CPUs. It updates the SCMI cpufreq to utilize the power
    domain bindings. It also adds a more generic SCMI performance domain
    based on the genpd framework that as be used for all the non-CPU
    devices.
 
 3. Extend the generic performance scaling(DVFS) support for firmware
    driver OPPs:
    Consumer drivers for devices that are attached to the SCMI performance
    domain can't make use of the current OPP library to scale performance
    as the OPPs are firmware driven and often obtained from the firmware
    rather than the device tree. These changes extend the generic OPP
    and genpd PM domain frameworks to identify and utilise these firmware
    driven OPPs.
 
 4. SCMI v3.2 clock parent support:
    This enables the support for discovering and changing parent clocks
    and extending the SCMI clk driver to use the same.
 
 5. Qualcom SMC/HVC transport support:
    The Qualcomm virtual platforms require capability id in the hypervisor
    call to identify which doorbell to assert when supporting multiple
    SMC/HVC based SCMI transport channels. Extra parameter is added to
    support the same and the same is obtained at the fixed address in the
    shared memory which is initialised by the firmware.
 
 6. Move the existing SCMI power domain driver under drivers/pmdomain
 
 Apart from the above main changes, it also include couple of minor fixes
 and cosmetic reworks.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmUlJnAACgkQAEG6vDF+
 4phxrw/+KLuLGg0QXTps4trI1E9cTAivpnEe6sWM27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n+cX4kwq8WYl0YOk9+OLsjtIozxhRcglTxMmpBSCdFxAV2LRjiS
 12tp2HJMNQgx5c187CCckoeoIpkjSvTJhzRHBxnzb/wzonaGm42ERCu93vSyp6G0
 xccI/rEvjiJmlrBa8up30v+zFEe7II8u2TarnkxWVQ157Ww8bdWKZPq7pKsKrxm0
 tYnDhMJxosxEh6xSjurBZTJoJTnPZQKE+IUAClpCUzszf1hWHeJUbo2CsfuJw7RH
 3jUtM9nfSJCT6GFyM8wxwH/RP2Rt3U9olrW4zoZz7jkxHcLuOgJGQyFYgLHKrmsP
 ez3zFEiGAYysoJuSy7so0KEzjLkVhqO+XFdBtctOkRJ+tajx6i1ute9oQvOqs/TJ
 /CIuBl3+XECcNGm3InEI0aCillFAw69LKYupcUlNrcKJ9f0zFec=
 =u9+1
 -----END PGP SIGNATURE-----

Merge tag 'scmi-updates-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers

Arm SCMI updates for v6.7

Main additions this time include:

1. SCMI v3.2 clock configuration support:
   This helps to retrieve the enabled state of a clock as well as allow
   to set OEM specific clock configurations.

2. Support for generic performance scaling(DVFS):
   The current SCMI DVFS support is limited to the CPUs in the kernel.
   This extension enables it to used for all kind of devices and not
   only for the CPUs. It updates the SCMI cpufreq to utilize the power
   domain bindings. It also adds a more generic SCMI performance domain
   based on the genpd framework that as be used for all the non-CPU
   devices.

3. Extend the generic performance scaling(DVFS) support for firmware
   driver OPPs:
   Consumer drivers for devices that are attached to the SCMI performance
   domain can't make use of the current OPP library to scale performance
   as the OPPs are firmware driven and often obtained from the firmware
   rather than the device tree. These changes extend the generic OPP
   and genpd PM domain frameworks to identify and utilise these firmware
   driven OPPs.

4. SCMI v3.2 clock parent support:
   This enables the support for discovering and changing parent clocks
   and extending the SCMI clk driver to use the same.

5. Qualcom SMC/HVC transport support:
   The Qualcomm virtual platforms require capability id in the hypervisor
   call to identify which doorbell to assert when supporting multiple
   SMC/HVC based SCMI transport channels. Extra parameter is added to
   support the same and the same is obtained at the fixed address in the
   shared memory which is initialised by the firmware.

6. Move the existing SCMI power domain driver under drivers/pmdomain

Apart from the above main changes, it also include couple of minor fixes
and cosmetic reworks.

* tag 'scmi-updates-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: (37 commits)
  firmware: arm_scmi: Add qcom smc/hvc transport support
  dt-bindings: arm: Add new compatible for smc/hvc transport for SCMI
  firmware: arm_scmi: Convert u32 to unsigned long to align with arm_smccc_1_1_invoke()
  clk: scmi: Add support for clock {set,get}_parent
  firmware: arm_scmi: Add support for clock parents
  clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped
  firmware: arm_scpi: Use device_get_match_data()
  firmware: arm_scmi: Add generic OPP support to the SCMI performance domain
  firmware: arm_scmi: Specify the performance level when adding an OPP
  firmware: arm_scmi: Simplify error path in scmi_dvfs_device_opps_add()
  OPP: Extend support for the opp-level beyond required-opps
  OPP: Switch to use dev_pm_domain_set_performance_state()
  OPP: Extend dev_pm_opp_data with a level
  OPP: Add dev_pm_opp_add_dynamic() to allow more flexibility
  PM: domains: Implement the ->set_performance_state() callback for genpd
  PM: domains: Introduce dev_pm_domain_set_performance_state()
  firmware: arm_scmi: Rename scmi_{msg_,}clock_config_{get,set}_{2,21}
  firmware: arm_scmi: Do not use !! on boolean when setting msg->flags
  firmware: arm_scmi: Move power-domain driver to the pmdomain dir
  pmdomain: arm: Add the SCMI performance domain
  ...

Link: https://lore.kernel.org/r/20231010124347.1620040-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-16 22:54:17 +02:00
Sumit Gupta ea608a01d4 firmware: tegra: Add suspend hook and reset BPMP IPC early on resume
Add suspend hook and a 'suspended' field in the 'struct tegra_bpmp'
to mark if BPMP is suspended. Also, add a 'flags' field in the
'struct tegra_bpmp_message' whose 'TEGRA_BPMP_MESSAGE_RESET' bit can be
set from the Tegra MC driver to signal that the reset of BPMP IPC
channels is required before sending MRQ to the BPMP FW. Together both
the fields allow us to handle any requests that might be sent too soon
as they can cause hang during system resume.

One case where we see BPMP requests being sent before the BPMP driver
has resumed is the memory bandwidth requests which are triggered by
onlining the CPUs during system resume. The CPUs are onlined before the
BPMP has resumed and we need to reset the BPMP IPC channels to handle
these requests.

The additional check for 'flags' is done to avoid any un-intended BPMP
IPC reset if the tegra_bpmp_transfer*() API gets called during suspend
sequence after the BPMP driver is suspended.

Fixes: f41e1442ac ("cpufreq: tegra194: add OPP support and set bandwidth")
Co-developed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2023-10-13 14:20:27 +02:00
Nikunj Kela da405477e7 firmware: arm_scmi: Add qcom smc/hvc transport support
This change adds the support for SCMI message exchange on Qualcomm
virtual platforms.

The hypervisor associates an object-id also known as capability-id
with each smc/hvc doorbell object. The capability-id is used to
identify the doorbell from the VM's capability namespace, similar
to a file-descriptor.

The hypervisor, in addition to the function-id, expects the capability-id
to be passed in x1 register when SMC/HVC call is invoked.

The capability-id is allocated by the hypervisor on bootup and is stored in
the shmem region by the firmware before starting Linux.

Signed-off-by: Nikunj Kela <quic_nkela@quicinc.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Link: https://lore.kernel.org/r/20231009191437.27926-3-quic_nkela@quicinc.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-09 22:07:13 +01:00
Sudeep Holla 1f17395124 firmware: arm_scmi: Convert u32 to unsigned long to align with arm_smccc_1_1_invoke()
All the parameters to arm_smccc_1_1_invoke() are unsigned long which
aligns well on both 32-bit and 64-bit Arm based platforms. Let us store
all the members in the structure scmi_smc used as the parameters to the
arm_smccc_1_1_invoke() call as unsigned long.

Cc: Cristian Marussi <cristian.marussi@arm.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20231009152049.1428872-1-sudeep.holla@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-09 22:05:22 +01:00
Rob Herring 5d59b6a49b firmware: meson: Use device_get_match_data()
Use preferred device_get_match_data() instead of of_match_device() to
get the driver match data. With this, adjust the includes to explicitly
include the correct headers.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20231006224644.445295-1-robh@kernel.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-10-09 10:48:15 +02:00
Sudeep Holla bcefd1bf63 firmware: arm_ffa: Upgrade the driver version to v1.1
With quite a few v1.1 features supported, we can bump the driver version
to v1.1 now.

Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-17-cddd3237809c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-08 21:18:48 +01:00
Sudeep Holla 113580530e firmware: arm_ffa: Update memory descriptor to support v1.1 format
Update memory transaction descriptor structure to accommodate couple of
new entries in v1.1 which were previously marked reserved and MBZ(must
be zero).

It also removes the flexible array member ep_mem_access in the memory
transaction descriptor structure as it need not be at fixed offset.
Also update ffa_mem_desc_offset() accessor to handle both old and new
formats of memory transaction descriptors.

The updated ffa_mem_region structure aligns with new format in v1.1 and
hence the driver/user must take care not to use members beyond and
including ep_mem_offset when using the old format.

Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-16-cddd3237809c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-08 21:18:48 +01:00
Sudeep Holla e4607b84c6 firmware: arm_ffa: Switch to using ffa_mem_desc_offset() accessor
In preparation to add support to the new memory transaction descriptor,
the ep_mem_access member needs to be removed and hence even the macro
COMPOSITE_OFFSET(). Let us switch to using the new ffa_mem_desc_offset()
accessor in ffa_setup_and_transmit().

This will enable adding the support for new format transparently without
any changes here again.

Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-15-cddd3237809c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-08 21:18:48 +01:00
Peng Fan 77bbfe607b firmware: arm_scmi: Add support for clock parents
SCMI v3.2 spec introduces CLOCK_POSSIBLE_PARENTS_GET, CLOCK_PARENT_SET
and CLOCK_PARENT_GET. Add support for these to enable clock parents
and use them in the clock driver.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20231004-scmi-clock-v3-v5-1-1b8a1435673e@nxp.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-08 21:16:30 +01:00
Rob Herring 908af696c5 firmware: arm_scpi: Use device_get_match_data()
Use preferred device_get_match_data() instead of of_match_device() to
get the driver match data. With this, adjust the includes to explicitly
include the correct headers.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231006224650.445424-1-robh@kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-08 21:16:30 +01:00
Sudeep Holla c9b21ef0d0 firmware: arm_ffa: Simplify the computation of transmit and fragment length
The computation of endpoint memory access descriptor's composite memory
region descriptor offset is using COMPOSITE_CONSTITUENTS_OFFSET which is
unnecessary complicated. Composite memory region descriptor always follow
the endpoint memory access descriptor array and hence it is computed
accordingly. COMPOSITE_CONSTITUENTS_OFFSET is useless and wrong for any
input other than endpoint memory access descriptor count.

Let us drop the usage of COMPOSITE_CONSTITUENTS_OFFSET to simplify the
computation of total transmit and fragment length in the memory
transactions.

Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-13-cddd3237809c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 15:33:14 +01:00
Sudeep Holla 1b6bf41b7a firmware: arm_ffa: Add notification handling mechanism
With all the necessary plumbing in place, let us add handling the
notifications as part of schedule receiver interrupt handler. In order
to do so, we need to just register scheduling callback on behalf of the
driver partition.

Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-12-cddd3237809c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 15:33:14 +01:00
Sudeep Holla e5adb3b20e firmware: arm_ffa: Add interface to send a notification to a given partition
The framework provides an interface to the sender endpoint to specify
the notification to signal to the receiver endpoint. A sender signals
a notification by requesting its partition manager to set the
corresponding bit in the notifications bitmap of the receiver.

Expose the ability to send a notification to another partition.

Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-11-cddd3237809c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 15:33:13 +01:00
Sudeep Holla e0573444ed firmware: arm_ffa: Add interfaces to request notification callbacks
Add interface to the FFA driver to allow for client drivers to request
and relinquish a notification as well as provide a callback for the
notification.

Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-10-cddd3237809c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 15:33:13 +01:00
Sudeep Holla 0184450b8b firmware: arm_ffa: Add schedule receiver callback mechanism
Enable client drivers to register a callback function that will be
called when one or more notifications are pending for a target
partition as part of schedule receiver interrupt handling.

Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-9-cddd3237809c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 15:33:13 +01:00
Sudeep Holla 897e9e60c0 firmware: arm_ffa: Initial support for scheduler receiver interrupt
The Framework uses the schedule receiver interrupt to inform the
receiver’s scheduler that the receiver must be run to handle a pending
notification. A receiver’s scheduler can obtain the description of the
schedule receiver interrupt by invoking the FFA_FEATURES interface.

The delivery of the physical schedule receiver interrupt from the secure
state to the non-secure state depends upon the state of the interrupt
controller as configured by the hypervisor.

The schedule seceiver interrupt is assumed to be a SGI. The Arm GIC
specification defines 16 SGIs. It recommends that they are equally
divided between the non-secure and secure states. OS like Linux kernel
in the non-secure state typically do not have SGIs to spare. The usage
of SGIs in the secure state is however limited. It is more likely that
software in the Secure world does not use all the SGIs allocated to it.

It is recommended that the secure world software donates an unused SGI
to the normal world for use as the schedule receiver interrupt. This
implies that secure world software must configure the SGI in the GIC
as a non-secure interrupt before presenting it to the normal world.

Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-8-cddd3237809c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 15:33:13 +01:00
Sudeep Holla 3522be48d8 firmware: arm_ffa: Implement the NOTIFICATION_INFO_GET interface
The receiver’s scheduler uses the FFA_NOTIFICATION_INFO_GET interface
to retrieve the list of endpoints that have pending notifications and
must be run. A notification could be signaled by a sender in the secure
world to a VM. The Hypervisor needs to determine which VM and vCPU
(in case a per-vCPU notification is signaled) has a pending notification
in this scenario. It must obtain this information through an invocation
of the FFA_NOTIFICATION_INFO_GET.

Add the implementation of the NOTIFICATION_INFO_GET interface
and prepare to use this to handle the schedule receiver interrupt.
Implementation of handling notifications will be added later.

Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-7-cddd3237809c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 15:33:13 +01:00
Sudeep Holla faa19623e3 firmware: arm_ffa: Implement the FFA_NOTIFICATION_GET interface
The framework provides an interface to the receiver to determine the
identity of the notification. A receiver endpoint must use the
FFA_NOTIFICATION_GET interface to retrieve its pending notifications
and handle them.

Add the support for FFA_NOTIFICATION_GET to allow the caller(receiver)
to fetch its pending notifications from other partitions in the system.

Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-6-cddd3237809c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 15:33:13 +01:00
Sudeep Holla 47561777d6 firmware: arm_ffa: Implement the FFA_NOTIFICATION_SET interface
The framework provides an interface to the sender to specify the
notification to signal to the receiver. A sender signals a notification
by requesting its partition manager to set the corresponding bit in the
notifications bitmap of the receiver invoking FFA_NOTIFICATION_SET.

Implement the FFA_NOTIFICATION_SET to enable the caller(sender) to send
the notifications for any other partitions in the system.

Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-5-cddd3237809c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 15:33:13 +01:00
Sudeep Holla fe2ddb6b42 firmware: arm_ffa: Implement the FFA_RUN interface
FFA_RUN is used by a scheduler to allocate CPU cycles to a target
endpoint execution context specified in the target information parameter.

If the endpoint execution context is in the waiting/blocked state, it
transitions to the running state.

Expose the ability to call FFA_RUN in order to give any partition in the
system cpu cycles to perform IMPDEF functionality.

Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-4-cddd3237809c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 15:33:13 +01:00
Sudeep Holla 933db703e8 firmware: arm_ffa: Implement the notification bind and unbind interface
A receiver endpoint must bind a notification to any sender endpoint
before the latter can signal the notification to the former. The receiver
assigns one or more doorbells to a specific sender. Only the sender can
ring these doorbells.

A receiver uses the FFA_NOTIFICATION_BIND interface to bind one or more
notifications to the sender. A receiver un-binds a notification from a
sender endpoint to stop the notification from being signaled. It uses
the FFA_NOTIFICATION_UNBIND interface to do this.

Allow the FF-A driver to be able to bind and unbind a given notification
ID to a specific partition ID. This will be used to register and
unregister notification callbacks from the FF-A client drivers.

Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-3-cddd3237809c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 15:33:13 +01:00
Sudeep Holla 192e88cfea firmware: arm_ffa: Implement notification bitmap create and destroy interfaces
On systems without a hypervisor the responsibility of requesting the
creation of the notification bitmaps in the SPM falls to the FF-A driver.

We use FFA features to determine if the ABI is supported, if it is not
we can assume there is a hypervisor present and will take care of ensure
the relevant notifications bitmaps are created on this partitions behalf.

An endpoint’s notification bitmaps needs to be setup before it configures
its notifications and before other endpoints and partition managers can
start signaling these notifications.

Add interface to create and destroy the notification bitmaps and use the
same to do the necessary setup during the initialisation and cleanup
during the module exit.

Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-2-cddd3237809c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 15:33:13 +01:00
Sudeep Holla 1609626c32 firmware: arm_ffa: Update the FF-A command list with v1.1 additions
Arm Firmware Framework for A-profile(FFA) v1.1 introduces notifications
and indirect messaging based upon notifications support and extends some
of the memory interfaces.

Let us add all the newly supported FF-A function IDs in the spec.
Also update to the error values and associated handling.

Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-1-cddd3237809c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 15:33:12 +01:00
Sudeep Holla 22779149e9 firmware: arm_ffa: Emit modalias for FF-A devices
In order to enable libkmod lookups for FF-A device objects to their
corresponding module, add 'modalias' to the base attribute of FF-A
devices.

Tested-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Link: https://lore.kernel.org/r/20231005175640.379631-1-sudeep.holla@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 15:32:47 +01:00
Sudeep Holla 2d698e8b4f firmware: arm_ffa: Allow the FF-A drivers to use 32bit mode of messaging
An FF-A ABI could support both the SMC32 and SMC64 conventions.
A callee that runs in the AArch64 execution state and implements such
an ABI must implement both SMC32 and SMC64 conventions of the ABI.

So the FF-A drivers will need the option to choose the mode irrespective
of FF-A version and the partition execution mode flag in the partition
information.

Let us remove the check on the FF-A version for allowing the selection
of 32bit mode of messaging. The driver will continue to set the 32-bit
mode if the partition execution mode flag specified that the partition
supports only 32-bit execution.

Fixes: 106b11b1cc ("firmware: arm_ffa: Set up 32bit execution mode flag using partiion property")
Link: https://lore.kernel.org/r/20231005142823.278121-1-sudeep.holla@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 15:32:41 +01:00
Sudeep Holla 7d0bc6360f firmware: arm_ffa: Assign the missing IDR allocation ID to the FFA device
Commit 19b8766459 ("firmware: arm_ffa: Fix FFA device names for logical
partitions") added an ID to the FFA device using ida_alloc() and append
the same to "arm-ffa" to make up a unique device name. However it missed
to stash the id value in ffa_dev to help freeing the ID later when the
device is destroyed.

Due to the missing/unassigned ID in FFA device, we get the following
warning when the FF-A device is unregistered.

  |   ida_free called for id=0 which is not allocated.
  |   WARNING: CPU: 7 PID: 1 at lib/idr.c:525 ida_free+0x114/0x164
  |   CPU: 7 PID: 1 Comm: swapper/0 Not tainted 6.6.0-rc4 #209
  |   pstate: 61400009 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
  |   pc : ida_free+0x114/0x164
  |   lr : ida_free+0x114/0x164
  |   Call trace:
  |    ida_free+0x114/0x164
  |    ffa_release_device+0x24/0x3c
  |    device_release+0x34/0x8c
  |    kobject_put+0x94/0xf8
  |    put_device+0x18/0x24
  |    klist_devices_put+0x14/0x20
  |    klist_next+0xc8/0x114
  |    bus_for_each_dev+0xd8/0x144
  |    arm_ffa_bus_exit+0x30/0x54
  |    ffa_init+0x68/0x330
  |    do_one_initcall+0xdc/0x250
  |    do_initcall_level+0x8c/0xac
  |    do_initcalls+0x54/0x94
  |    do_basic_setup+0x1c/0x28
  |    kernel_init_freeable+0x104/0x170
  |    kernel_init+0x20/0x1a0
  |    ret_from_fork+0x10/0x20

Fix the same by actually assigning the ID in the FFA device this time
for real.

Fixes: 19b8766459 ("firmware: arm_ffa: Fix FFA device names for logical partitions")
Link: https://lore.kernel.org/r/20231003085932.3553985-1-sudeep.holla@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 15:32:33 +01:00
Ulf Hansson 5a6a104193 firmware: arm_scmi: Specify the performance level when adding an OPP
To enable the performance level to be used for OPPs, let's convert into
using the dev_pm_opp_add_dynamic() API when creating them. This will be
particularly useful for the SCMI performance domain, as shown through
subsequent changes.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20230925131715.138411-9-ulf.hansson@linaro.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 09:41:03 +01:00
Ulf Hansson 033ca4de12 firmware: arm_scmi: Simplify error path in scmi_dvfs_device_opps_add()
Let's simplify the code in scmi_dvfs_device_opps_add() by using
dev_pm_opp_remove_all_dynamic() in the error path.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20230925131715.138411-8-ulf.hansson@linaro.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-10-06 09:41:03 +01:00
Linus Torvalds e402b08634 ARM: SoC fixes for 6.6
These are teh latest bug fixes that have come up in the soc tree.
 Most of these are fairly minor. Most notably, the majority of
 changes this time are not for dts files as usual.
 
  - Updates to the addresses of the broadcom and aspeed entries in the
    MAINTAINERS file.
 
  - Defconfig updates to address a regression on samsung and a build
    warning from an unknown Kconfig symbol
 
  - Build fixes for the StrongARM and Uniphier platforms
 
  - Code fixes for SCMI and FF-A firmware drivers, both of which had
    a simple bug that resulted in invalid data, and a lesser fix for
    the optee firmware driver
 
  - Multiple fixes for the recently added loongson/loongarch "guts"
    soc driver
 
  - Devicetree fixes for RISC-V on the startfive platform, addressing
    issues with NOR flash, usb and uart.
 
  - Multiple fixes for NXP i.MX8/i.MX9 dts files, fixing problems
    with clock, gpio, hdmi settings and the Makefile
 
  - Bug fixes for i.MX firmware code and the OCOTP soc driver
 
  - Multiple fixes for the TI sysc bus driver
 
  - Minor dts updates for TI omap dts files, to address boot
    time warnings and errors
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUYkbMACgkQYKtH/8kJ
 UieVvhAAxBNwvYsM7YCqmcD0xENAwMam3+zVEsDNac6yp4k1zrJxPItYeqx65qvj
 de3/1toUcq5q/XN1MQYyIdHrL4QX/I3KG8+SJB/X9z0if882CUtC/1fd9d7Mj0hu
 K7T7JZHDUj2rk+6Bh6sLRp6QmuS2KcKErYFlASXqqg49MddjbB8/QtYPZEAUOlmK
 x4l9trnno42gvzjkNba/w1uiOA1WIwUp6d6VoM7oxIiFomHxBBZf1mzTgXaNDNvN
 2vf+kumhQNvC3tKOUZNxps4N21N6kz0MAad/VcCKUyQ1bDTicdVwkTKUTrHs+hcu
 EauWObm+fFfdSTflQ3R9+6ooDN70CCpDmS+ZdoFP/Nt+h9m/TcNYHp5mtr3gt9+O
 cDkkGPKQyVBw0HjEG6yzEfYnPJ8w7v/+zpnie4Drc61i/kb8ETVNd9eOJTftvsFu
 QcsANKdeZOc/64ZL27FD1ZZrvDWJsIDVG3dcX2+AgoZhjo0M3HGKv1LtWqJhvspU
 lCzGNBsjcG/bQMupVxgomRhvg9hWWnXLTp949dOESecx4iUDEXl3nCo0+efXB2Tx
 DNLnMEXC1F/B2GdYRUU61fmGVwIgItLJtyYFB8Miw+id+K0k8+uaklq2dHmLZOtq
 FWbCB9oMks7q3lcEn1GJeIYFetuO+dmSEam/Hcg2hmW0Ke1ZZQI=
 =HAuE
 -----END PGP SIGNATURE-----

Merge tag 'soc-fixes-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC fixes from Arnd Bergmann:
 "These are the latest bug fixes that have come up in the soc tree. Most
  of these are fairly minor. Most notably, the majority of changes this
  time are not for dts files as usual.

   - Updates to the addresses of the broadcom and aspeed entries in the
     MAINTAINERS file.

   - Defconfig updates to address a regression on samsung and a build
     warning from an unknown Kconfig symbol

   - Build fixes for the StrongARM and Uniphier platforms

   - Code fixes for SCMI and FF-A firmware drivers, both of which had a
     simple bug that resulted in invalid data, and a lesser fix for the
     optee firmware driver

   - Multiple fixes for the recently added loongson/loongarch "guts" soc
     driver

   - Devicetree fixes for RISC-V on the startfive platform, addressing
     issues with NOR flash, usb and uart.

   - Multiple fixes for NXP i.MX8/i.MX9 dts files, fixing problems with
     clock, gpio, hdmi settings and the Makefile

   - Bug fixes for i.MX firmware code and the OCOTP soc driver

   - Multiple fixes for the TI sysc bus driver

   - Minor dts updates for TI omap dts files, to address boot time
     warnings and errors"

* tag 'soc-fixes-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (35 commits)
  MAINTAINERS: Fix Florian Fainelli's email address
  arm64: defconfig: enable syscon-poweroff driver
  ARM: locomo: fix locomolcd_power declaration
  soc: loongson: loongson2_guts: Remove unneeded semicolon
  soc: loongson: loongson2_guts: Convert to devm_platform_ioremap_resource()
  soc: loongson: loongson_pm2: Populate children syscon nodes
  dt-bindings: soc: loongson,ls2k-pmc: Allow syscon-reboot/syscon-poweroff as child
  soc: loongson: loongson_pm2: Drop useless of_device_id compatible
  dt-bindings: soc: loongson,ls2k-pmc: Use fallbacks for ls2k-pmc compatible
  soc: loongson: loongson_pm2: Add dependency for INPUT
  arm64: defconfig: remove CONFIG_COMMON_CLK_NPCM8XX=y
  ARM: uniphier: fix cache kernel-doc warnings
  MAINTAINERS: aspeed: Update Andrew's email address
  MAINTAINERS: aspeed: Update git tree URL
  firmware: arm_ffa: Don't set the memory region attributes for MEM_LEND
  arm64: dts: imx: Add imx8mm-prt8mm.dtb to build
  arm64: dts: imx8mm-evk: Fix hdmi@3d node
  soc: imx8m: Enable OCOTP clock for imx8mm before reading registers
  arm64: dts: imx8mp-beacon-kit: Fix audio_pll2 clock
  arm64: dts: imx8mp: Fix SDMA2/3 clocks
  ...
2023-09-30 18:41:37 -07:00
Arnd Bergmann 5106e65f23 Arm SCMI fix for v6.6
A single fix to address scmi_perf_attributes_get() using the protocol
 version even before it was populated and ending up with unexpected
 bogowatts power scale.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmUUGkkACgkQAEG6vDF+
 4phm7g/+LjCMNZ0uxp/qxcZszFJln2wO2MFnY2X55o/anFlLoMQdeDlzBgGGP5Ul
 UmMo29Aq0n6FmPkrj2oV+3QR5oRKSauSbkLDxYGP4GVxpZ8zC8YotNV4z9XfxbnZ
 +SoZflXFCO/P/lPq7MMVJNcB4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3e0e6qKsyA/frOt7lqFU/J81HHxEQpEKg1bVqPpuviYNRNNfms4XPrtx9+DWPd
 xdQoqUW3jGJ4yzgxh4V1ZDvIFP2/1C1gilayXxtHcoo9H3Grue9n6ApTcO1HJQaC
 JIHIwSWn2PkxZ919fPmqJHY8bFLkjJHWYRM+oPrp/Cn5B3NLQ1ICGPbDRmS5x/Vs
 mTBjjkwRVJcHmMLN+5/XdQYKRzrHAtKD8Um6V4nJ1iRkI7IQykGY4KHqmyxCRWMh
 mcMsq89suKAAimy+kTmg1kP/OYR5zAMaikQx/QsmOYgxRdAGkHU=
 =ZyGq
 -----END PGP SIGNATURE-----

Merge tag 'scmi-fix-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes

Arm SCMI fix for v6.6

A single fix to address scmi_perf_attributes_get() using the protocol
version even before it was populated and ending up with unexpected
bogowatts power scale.

* tag 'scmi-fix-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_scmi: Fixup perf power-cost/microwatt support

Link: https://lore.kernel.org/r/20230927121604.158645-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-09-28 09:15:12 +02:00
Arnd Bergmann 79684f2ea3 Arm FF-A fix for v6.6
It has been reported that the driver sets the memory region attributes
 for MEM_LEND operation when the specification clearly states not to. The
 fix here addresses the issue by ensuring the memory region attributes are
 cleared for the memory lending operation.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmUUG70ACgkQAEG6vDF+
 4pg0Og//dteLTtj/mHej4fIL3ih0qNN6Ih1NXlqfcgc4Yw7EcLhnKZabwGy3Ybdq
 4egdPwHXLPMS7XAxg7y2WWoMA7+raFYp8vYOWOjHdTPmgDjzxHMybMP3J31RSjfL
 gi4DoF8g2EF0bwtMvk0A3pTqgQG3YOfMupf9CLPZg5XOmPVDAq5R1zn3hu/Dz/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TbGi7GOOjuWJl4c3wJtR/Ps1vha
 GFnggmOqjRFYi+YBzShCn/pZGgcAHWadcLn3zklCcnNaRj+2voXyqKOkDbuhteFs
 4zt1ggvykeAQ8mU9+HwiwIZek9X7hsKI7bz2jKTV8uugqr5DDTnY7vwOtGvZochk
 GBpEZH12e5Cf9QO74Nam5kvLJqpj3orhSul0jnWZ1R8n9Obv0IH/ytthctDnP4Ek
 XFqGiBoQzDTNIjANcmr0UG46l+95J9Lbi7iyk+tX7z5+wVxkQ7U=
 =MdPT
 -----END PGP SIGNATURE-----

Merge tag 'ffa-fix-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes

Arm FF-A fix for v6.6

It has been reported that the driver sets the memory region attributes
for MEM_LEND operation when the specification clearly states not to. The
fix here addresses the issue by ensuring the memory region attributes are
cleared for the memory lending operation.

* tag 'ffa-fix-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_ffa: Don't set the memory region attributes for MEM_LEND

Link: https://lore.kernel.org/r/20230927121555.158619-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-09-28 09:14:34 +02:00
Kathiravan Thirumoorthy 3337a6fea2 firmware: qcom_scm: use 64-bit calling convention only when client is 64-bit
Per the "SMC calling convention specification", the 64-bit calling
convention can only be used when the client is 64-bit. Whereas the
32-bit calling convention can be used by either a 32-bit or a 64-bit
client.

Currently during SCM probe, irrespective of the client, 64-bit calling
convention is made, which is incorrect and may lead to the undefined
behaviour when the client is 32-bit. Let's fix it.

Cc: stable@vger.kernel.org
Fixes: 9a434cee77 ("firmware: qcom_scm: Dynamically support SMCCC and legacy conventions")
Reviewed-By: Elliot Berman <quic_eberman@quicinc.com>
Signed-off-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
Link: https://lore.kernel.org/r/20230925-scm-v3-1-8790dff6a749@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2023-09-27 16:19:14 -07:00
Sudeep Holla 8b6022be4c firmware: arm_scmi: Rename scmi_{msg_,}clock_config_{get,set}_{2,21}
It is very confusing to use *_v2 for everything applicable until SCMI
clock protocol version v2.0 including v1.0 for example. So let us rename
such that *_v2 is used only for SCMI clock protocol v2.1 onwards. Also
add comment to indicate the same explicitly.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20230925101557.3839860-1-sudeep.holla@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-09-27 13:53:23 +01:00
Sudeep Holla a10aa2584e firmware: arm_scmi: Do not use !! on boolean when setting msg->flags
Both pc->async_powercap_cap_set and ignore_dresp are already boolean.
Use of !! on them is obviously dubious.

Sparse reports:
drivers/firmware/arm_scmi/powercap.c:363:17: warning: dubious: x & !y
drivers/firmware/arm_scmi/powercap.c:363:17: warning: dubious: x & !y

Remove the unnecessary !! and get rid of the warning.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20230921085257.3125744-1-sudeep.holla@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-09-27 13:17:53 +01:00
Sudeep Holla 9dda117847 firmware: arm_ffa: Don't set the memory region attributes for MEM_LEND
As per the FF-A specification: section "Usage of other memory region
attributes", in a transaction to donate memory or lend memory to a single
borrower, if the receiver is a PE or Proxy endpoint, the owner must not
specify the attributes and the relayer will return INVALID_PARAMETERS
if the attributes are set.

Let us not set the memory region attributes for MEM_LEND.

Fixes: 82a8daaecf ("firmware: arm_ffa: Add support for MEM_LEND")
Reported-by: Joao Alves <joao.alves@arm.com>
Reported-by: Olivier Deprez <olivier.deprez@arm.com>
Link: https://lore.kernel.org/r/20230919-ffa_v1-1_notif-v2-13-6f3a3ca3923c@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-09-25 19:43:49 +01:00
Linus Torvalds dc912ba91b EFI fixes for v6.6 take 2:
- fix boot regression on SEV-SNP (and TDX) caused by a fix in the
   preceding batch
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQQm/3uucuRGn1Dmh0wbglWLn0tXAUCZQ1ddAAKCRAwbglWLn0t
 XOIQAP4nS3RWd2On40iOMpyfmKo8BmuM1smJC5r6xQTc55eORwEA3ezhbKZruxMp
 bU2qR0yH/aGEtyOX0lDN0NIntplQdgI=
 =ldKV
 -----END PGP SIGNATURE-----

Merge tag 'efi-fixes-for-v6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi

Pull EFI fix from Ard Biesheuvel:
 "Follow-up fix for the unaccepted memory fix merged last week as part
  of the first EFI fixes batch.

  The unaccepted memory table needs to be accessible very early, even in
  cases (such as crashkernels) where the direct map does not cover all
  of DRAM, and so it is added to memblock explicitly, and subsequently
  memblock_reserve()'d as before"

* tag 'efi-fixes-for-v6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
  efi/unaccepted: Make sure unaccepted table is mapped
2023-09-22 09:25:26 -07:00
Sudeep Holla af78e5c309 firmware: arm_scmi: Move power-domain driver to the pmdomain dir
To simplify with maintenance let's move the Arm SCMI power-domain driver
to the new pmdomain directory.

Link: https://lore.kernel.org/all/20230921113328.3208651-1-sudeep.holla@arm.com
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-09-21 16:35:14 +01:00
Ulf Hansson 2af23ceb86 pmdomain: arm: Add the SCMI performance domain
To enable support for performance scaling (DVFS) for generic devices with
the SCMI performance protocol, let's add an SCMI performance domain. This
is being modelled as a genpd provider, with support for performance scaling
through genpd's ->set_performance_state() callback.

Note that, this adds the initial support that allows consumer drivers for
attached devices, to vote for a new performance state via calling the
dev_pm_genpd_set_performance_state(). However, this should be avoided as
it's in most cases preferred to use the OPP library to vote for a new OPP
instead. The support using the OPP library isn't part of this change, but
needs to be implemented from subsequent changes.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20230919121605.7304-1-ulf.hansson@linaro.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-09-21 16:35:14 +01:00
Ulf Hansson 9b578d8362 firmware: arm_scmi: Drop redundant ->device_domain_id() from perf ops
There are no longer any users of the ->device_domain_id() ops in the
scmi_perf_proto_ops, therefore let's remove it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20230825112633.236607-6-ulf.hansson@linaro.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-09-21 16:24:27 +01:00
Ulf Hansson 39dfa5b9e1 firmware: arm_scmi: Align perf ops to use domain-id as in-parameter
Most scmi_perf_proto_ops are already using an "u32 domain" as an
in-parameter to indicate what performance domain we shall operate upon.
However, some of the ops are using a "struct device *dev", which means that
an additional OF parsing is needed each time the perf ops gets called, to
find the corresponding domain-id.

To avoid the above, but also to make the code more consistent, let's
replace the in-parameter "struct device *dev" with an "u32 domain". Note
that, this requires us to make some corresponding changes to the scmi
cpufreq driver, so let's do that too.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Link: https://lore.kernel.org/r/20230825112633.236607-5-ulf.hansson@linaro.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-09-21 16:24:27 +01:00
Ulf Hansson 3d99ed6072 firmware: arm_scmi: Extend perf protocol ops to get information of a domain
Similar to other protocol ops, it's useful for an scmi module driver to get
some generic information of a performance domain. Therefore, let's add a
new callback to provide this information. The information is currently
limited to the name of the performance domain and whether the set-level
operation is supported, although this can easily be extended if we find the
need for it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20230825112633.236607-3-ulf.hansson@linaro.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-09-21 16:24:27 +01:00
Ulf Hansson e9090e70e6 firmware: arm_scmi: Extend perf protocol ops to get number of domains
Similar to other protocol ops, it's useful for an scmi module driver to get
the number of supported performance domains, hence let's make this
available by adding a new perf protocol callback. Note that, a user is
being added from subsequent changes.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20230825112633.236607-2-ulf.hansson@linaro.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-09-21 16:15:35 +01:00
Linus Torvalds 2af5acbaa7 sound fixes for 6.6-rc3
A large collection of fixes around this time.
 All small and mostly trivial fixes.
 
 - Lots of fixes for the new -Wformat-truncation warnings
 - A fix in ALSA rawmidi core regression and UMP handling
 - Series of Cirrus codec fixes
 - ASoC Intel and Realtek codec fixes
 - Usual HD- and USB-audio quirks and AMD ASoC quirks
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmUMUWkOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE+hdxAA0+tcf9xj7Na58P3VCD0dCBddoJ4STModW8RZ
 SnOevnjIMLa7TFKnxyBNWTgtBlKpaJ62c+/ZJJt0dgzDaYAX/6kGz9I9WN5w/81x
 JKbXemtbv32h/STmE36G3j2pILzKMVo8Iew4aghga5t7QkZZuSfj5KPiKpg0lIE4
 LGfAoaPUFvsgHGqKKP4Y2qOeGkR7LWJ6r66mtC0WMb5LNddPrdsWbscj0ZfeEceE
 p3jQMk5Iw/d/8PueIdsVL0Epq8j46L+EKaNMgdG38eJsMxhhLnDoyZ4lRwIZ5Stg
 X+BTFULw7v/ldp/vBOoJgQYkjI9g51T7H1h58oZP1xup68eE1+QVw2D/Jpx+zDv8
 TZrp3YLlWMN3YVZKxKpum0AALGELYA1eSax94sifxwMOQ2P7ctDgVUVKq2mxiPWN
 W+244dvoz1IB6ey22PRP7eSx015CHAtOosCPesSYs2M8OPsz0ckfxijz7PGcpqTD
 7NFKAilG6lkMn638A4O1PG5l/DuMoIP8/W6JWeF83yCIxTvQVIcYdFxIku4rU8Lh
 LbyHU6nV9pH+B2RDjZpPQNVNZfp/egFlLsKGaIc9Wqjuur7vjryXRNs2y2Xq/0jq
 0xJsV8xoPj4WO2u4+sFkYNMZ5AjTPUGndGURA3QMMjsDUnAxTw6e4a5yf06V9hZU
 ZaWVhRk=
 =1MuW
 -----END PGP SIGNATURE-----

Merge tag 'sound-6.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A large collection of fixes around this time.

  All small and mostly trivial fixes.

   - Lots of fixes for the new -Wformat-truncation warnings

   - A fix in ALSA rawmidi core regression and UMP handling

   - Series of Cirrus codec fixes

   - ASoC Intel and Realtek codec fixes

   - Usual HD- and USB-audio quirks and AMD ASoC quirks"

* tag 'sound-6.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (64 commits)
  ALSA: hda/realtek - ALC287 Realtek I2S speaker platform support
  ALSA: hda: cs35l56: Use the new RUNTIME_PM_OPS() macro
  ALSA: usb-audio: scarlett_gen2: Fix another -Wformat-truncation warning
  ALSA: rawmidi: Fix NULL dereference at proc read
  ASoC: SOF: core: Only call sof_ops_free() on remove if the probe was successful
  ASoC: SOF: Intel: MTL: Reduce the DSP init timeout
  ASoC: cs42l43: Add shared IRQ flag for shutters
  ASoC: imx-audmix: Fix return error with devm_clk_get()
  ASoC: hdaudio.c: Add missing check for devm_kstrdup
  ALSA: riptide: Fix -Wformat-truncation warning for longname string
  ALSA: cs4231: Fix -Wformat-truncation warning for longname string
  ALSA: ad1848: Fix -Wformat-truncation warning for longname string
  ALSA: hda: generic: Check potential mixer name string truncation
  ALSA: cmipci: Fix -Wformat-truncation warning
  ALSA: firewire: Fix -Wformat-truncation warning for MIDI stream names
  ALSA: firewire: Fix -Wformat-truncation warning for longname string
  ALSA: xen: Fix -Wformat-truncation warning
  ALSA: opti9x: Fix -Wformat-truncation warning
  ALSA: es1688: Fix -Wformat-truncation warning
  ALSA: cs4236: Fix -Wformat-truncation warning
  ...
2023-09-21 08:13:15 -07:00
Robert Marko ff4aa3bc98 firmware: qcom_scm: disable SDI if required
IPQ5018 has SDI (Secure Debug Image) enabled by TZ by default, and that
means that WDT being asserted or just trying to reboot will hang the board
in the debug mode and only pulling the power and repowering will help.
Some IPQ4019 boards like Google WiFI have it enabled as well.

Luckily, SDI can be disabled via an SCM call.

So, lets use the boolean DT property to identify boards that have SDI
enabled by default and use the SCM call to disable SDI during SCM probe.
It is important to disable it as soon as possible as we might have a WDT
assertion at any time which would then leave the board in debug mode,
thus disabling it during SCM removal is not enough.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
Link: https://lore.kernel.org/r/20230816164641.3371878-2-robimarko@gmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2023-09-20 11:00:08 -07:00
Cristian Marussi 141b4fa036 firmware: arm_scmi: Add clock OEM config clock operations
Expose a couple of new SCMI clock operations to get and set OEM specific
clock configurations when talking to an SCMI v3.2 compliant.

Issuing such requests against an SCMI platform server not supporting v3.2
extension for OEM specific clock configurations will fail.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20230826125308.462328-7-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-09-20 15:01:40 +01:00
Cristian Marussi 5b8a8ca37e firmware: arm_scmi: Add clock .state_get support to pre-v3.2
Support clock .state_get operation against SCMI platform servers that do
not support v3.2 CONFIG_GET dedicated command: while talking with these
platforms the command CLOCK_ATTRIBUTES can be used to gather the current
clock states.

Note that, in case of shared resources, the retrieved clock state 'flavour'
(virtual vs physical) depends on the backend SCMI platform server specific
kind of implementation.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20230826125308.462328-5-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2023-09-20 15:01:40 +01:00