Qualcomm driver fixes for v6.3

Support for the secure world interrupting the SCM driver drive the wait
 queue mechanism was recently introduced, but most platforms doesn't have
 this mechanism and an error should not be printed in the log.
 
 The rmtfs_mem driver recently gained support for assigning the region to
 multiple VMIDs, but accidentally removed the support for running without
 assignment. A couple of changes are introducd to correct this.
 
 The SC8280XP LLCC slice configuration is wrong, reslting in incorrect
 configuration of the hardware. The table is corrected, based on the
 datasheet.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmQcYS8VHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3Frw8QALlh1wyf+Pjrbk/E7v2I+P7BCfAV
 kGv9s80G2xouM+DZOUZpi7TAgm/Z7WQKon6vft7djT9hktQBwqblWr4imNR7P1vV
 VBOwy9xXGuCH6JFIGOOOMpwTD46btJBJdiqu6HB4hNgXBHCIdgW5JZhONcHS1FxY
 7gQdFu1uGkkrytfGJJu97OYIpnsBgx45b1vETLTH9o1+eXLYNen9/zmerRcRuAZy
 PtMWKvFBEMyV8nlW8wafLBvQqJyj6n76ethnk0gvfEwWBbAvBjKa6LzxmW1cum8J
 t2d3STjIz0kY+lq1YFiew+vSOpv/ETvZHSFEZdL63sCUWhw0moUxgTn9lLxGurxl
 ekgnzyz0KtBO4QKSdamarN1A/jxKnnajUla1Iq5yu+lTkzwAt7wfW4TuODRxP0a9
 S3klroQX5EPRBDSENnOaMDliYhNjwqA41Q1XB8wz8wyF7LOVgtvcEV8G1s45mM3g
 HAu63CyxYgz6y/M/hCwREZin8OEKh9w7tcbdESRDBXD4xQAr6+S0W86F/uphZaxp
 VzAwq+k5v4pxU1uYfgNWwgAG5Tk91fMjxwBmMsQbyB0VyRMRpDurUbGq0zlWOvW5
 oWxmPPGTZ2fE51bUzt8tHsXPPD1rbT1V0sUgL9JLto3Whv3ASC7RFbnONTwMlYKK
 3J6hoSMsza1p4Qlm
 =Jf3z
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmQd2JUACgkQmmx57+YA
 GNmjaQ/7BTEd7l0AUaRD58BN0GWnLFa8z3UZtWKeSykOj9PTIoRMc568/S+2DirM
 THqM7NKUQcMeBTZ4t2LOS0RzfgW3VKLSEyAiWPD+r7/hsaeLYJJMp35HbcLwy7Hk
 zl/Te9+iqi2fpLiQ+2MRRGkwYv6NxzaY7AoUS8D8yjRsoyUiol3wQDjGvzXpkroU
 iydbK6eJAmRoCnjd13kzp/6lrZMZdfIuLCwYkU9WIkVTTxpvGVGpDqBAjM39O27Q
 h98nGymdSGB+fhu/UbaQj1E6CLoBg1e6xIWJjvk+lZFFLhvzY3q4scjex4MAuyJ6
 lAB635XT5gXSz/vgSZI/4zWwZP2SnWhwAUVX8Ysfpj2m8FF5NxS0u6hMdJh/z9op
 u8XjqwfUfTtpY2Jf5HLYnlHkAkE9GOULtSE27Z5cHX6LQzbfhT+YEGun0RmENavr
 ZbS/1nzovYhMJ3DAgNsl4JbftaimIFcfBZrhTDtddvqpgiavCWFfddEmno24Z5bD
 mN51vFp4JC7Z8nHmwfXP0FPcrDx1VLML6lE/NssACq95/q2vzQykb3HvTboBS4M4
 nTnOzkaJfjmN6157bnjMxPeyDlq75SXYCc9ke92qrFs8A6X9uyRXlwyrx09dbLYm
 lwXhWfbY0zZIQ/VqdNRcszLt/j7sNQpnvlAQOMnfNJhUUArAUqQ=
 =Vl/m
 -----END PGP SIGNATURE-----

Merge tag 'qcom-driver-fixes-for-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/fixes

Qualcomm driver fixes for v6.3

Support for the secure world interrupting the SCM driver drive the wait
queue mechanism was recently introduced, but most platforms doesn't have
this mechanism and an error should not be printed in the log.

The rmtfs_mem driver recently gained support for assigning the region to
multiple VMIDs, but accidentally removed the support for running without
assignment. A couple of changes are introducd to correct this.

The SC8280XP LLCC slice configuration is wrong, reslting in incorrect
configuration of the hardware. The table is corrected, based on the
datasheet.

* tag 'qcom-driver-fixes-for-6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  firmware: qcom: scm: fix bogus irq error at probe
  soc: qcom: rmtfs: handle optional qcom,vmid correctly
  soc: qcom: rmtfs: fix error handling reading qcom,vmid
  soc: qcom: llcc: Fix slice configuration values for SC8280XP

Link: https://lore.kernel.org/r/20230323142505.1086072-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2023-03-24 18:06:28 +01:00
commit ec7d8bd7d4
3 changed files with 11 additions and 7 deletions

View File

@ -1479,7 +1479,7 @@ static int qcom_scm_probe(struct platform_device *pdev)
init_completion(&__scm->waitq_comp);
irq = platform_get_irq(pdev, 0);
irq = platform_get_irq_optional(pdev, 0);
if (irq < 0) {
if (irq != -ENXIO)
return irq;

View File

@ -191,9 +191,9 @@ static const struct llcc_slice_config sc8280xp_data[] = {
{ LLCC_CVP, 28, 512, 3, 1, 0xfff, 0x0, 0, 0, 0, 1, 0, 0 },
{ LLCC_APTCM, 30, 1024, 3, 1, 0x0, 0x1, 1, 0, 0, 1, 0, 0 },
{ LLCC_WRCACHE, 31, 1024, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 },
{ LLCC_CVPFW, 32, 512, 1, 0, 0xfff, 0x0, 0, 0, 0, 1, 0, 0 },
{ LLCC_CPUSS1, 33, 2048, 1, 1, 0xfff, 0x0, 0, 0, 0, 1, 0, 0 },
{ LLCC_CPUHWT, 36, 512, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 },
{ LLCC_CVPFW, 17, 512, 1, 0, 0xfff, 0x0, 0, 0, 0, 1, 0, 0 },
{ LLCC_CPUSS1, 3, 2048, 1, 1, 0xfff, 0x0, 0, 0, 0, 1, 0, 0 },
{ LLCC_CPUHWT, 5, 512, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 },
};
static const struct llcc_slice_config sdm845_data[] = {

View File

@ -176,7 +176,8 @@ static int qcom_rmtfs_mem_probe(struct platform_device *pdev)
struct reserved_mem *rmem;
struct qcom_rmtfs_mem *rmtfs_mem;
u32 client_id;
u32 num_vmids, vmid[NUM_MAX_VMIDS];
u32 vmid[NUM_MAX_VMIDS];
int num_vmids;
int ret, i;
rmem = of_reserved_mem_lookup(node);
@ -228,8 +229,11 @@ static int qcom_rmtfs_mem_probe(struct platform_device *pdev)
}
num_vmids = of_property_count_u32_elems(node, "qcom,vmid");
if (num_vmids < 0) {
dev_err(&pdev->dev, "failed to count qcom,vmid elements: %d\n", ret);
if (num_vmids == -EINVAL) {
/* qcom,vmid is optional */
num_vmids = 0;
} else if (num_vmids < 0) {
dev_err(&pdev->dev, "failed to count qcom,vmid elements: %d\n", num_vmids);
goto remove_cdev;
} else if (num_vmids > NUM_MAX_VMIDS) {
dev_warn(&pdev->dev,