Commit graph

874,500 commits

Author SHA1 Message Date
qctecmdr
9b94944cd7 Merge "firmware: qcom_scm: Support SCM calls before qcom_scm probe" 2019-11-18 20:10:14 -08:00
qctecmdr
87e461a5b0 Merge "firmware: qcom_scm: Enable legacy convention in qcom_scm-64.c" 2019-11-18 19:35:17 -08:00
qctecmdr
6b47d58c25 Merge "firmware: qcom_scm: Merge legacy and SMCCC conventions" 2019-11-18 19:01:22 -08:00
qctecmdr
20b5b6d1ce Merge "firmware: qcom_scm-32: Add device argument to atomic calls" 2019-11-18 18:26:09 -08:00
qctecmdr
ec7edb6fa6 Merge "firmware: qcom_scm-32: Create common legacy atomic call" 2019-11-18 17:54:15 -08:00
qctecmdr
76465eebbb Merge "msm: ipa: Added an option to enable NAPI in 11ad" 2019-11-18 15:26:20 -08:00
qctecmdr
fcea949d55 Merge "msm: ipa3: Fix to memory allocation failure" 2019-11-18 14:51:15 -08:00
qctecmdr
31d355bad1 Merge "msm: ipa: add a thin parsing option for status packets" 2019-11-18 14:16:16 -08:00
qctecmdr
0550e27090 Merge "firmware: qcom_scm-32: Fill SMCCC register in qcom_scm_call" 2019-11-18 13:40:15 -08:00
Amir Levy
207c5a6707 msm: ipa: add a thin parsing option for status packets
In the LAN rx data path the status packet was parsed twice
but in the second time it parsed not all the info was needed.
So we added a function that is tailored for that scenario
to improve performance.

Acked-by: Tal Gelbard <tgelbard@qti.qualcomm.com>
Change-Id: I8a1755ba62cee4147941b5949c2b223fe76415b2
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2019-11-18 14:50:26 +02:00
Amir Levy
b4a0d6f786 msm: ipa: Added an option to enable NAPI in 11ad
Added a flag in the 11ad driver to indicate if NAPI is
enabled in the LAN RX Datapath. In case the flag is true
the 11ad driver will now use napi_gro_receive instead of
netif_rx_ni, meaning the GRO feature is also enabled
with this change.

Acked-by: Tal Gelbard <tgelbard@qti.qualcomm.com>
Change-Id: I5c6cb3e08c29c4b79cdcbc9e4d3acb485156a607
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2019-11-18 11:12:30 +02:00
Ashok Vuyyuru
c210ced674 msm: ipa4: Update mask and shift values for aggr force close register
Because of not updated mask and shift value, IPA HW not able to
process the forcce close command and asserting with invalid command
offset. Add changes to update mask and shift values for aggregation
force close register.

Change-Id: I19164a32c6a5d49fb005c4a09eb95a23a5d4b6ec
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2019-11-17 10:07:50 -08:00
qctecmdr
7db9be171f Merge "firmware: qcom_scm-32: Use qcom_scm_desc in non-atomic calls" 2019-11-16 06:18:21 -08:00
qctecmdr
fe159bfa5a Merge "firmware: qcom_scm-32: Use SMC arch wrappers" 2019-11-16 05:42:55 -08:00
qctecmdr
37d4fdf777 Merge "firmware: qcom_scm-64: Improve SMC convention detection" 2019-11-16 05:07:59 -08:00
qctecmdr
9a5a88e8e4 Merge "firmware: qcom_scm-64: Fill SMC registers in qcom_scm_call_smccc" 2019-11-16 04:29:15 -08:00
qctecmdr
1e486afe4d Merge "firmware: qcom_scm-64: Remove qcom_scm_call_do_smccc" 2019-11-16 03:45:29 -08:00
qctecmdr
1bf368ea9f Merge "firmware: qcom_scm-64: Add SCM results to descriptor" 2019-11-16 03:01:59 -08:00
qctecmdr
2fecbc3812 Merge "firmware: qcom_scm-64: Move svc/cmd/owner into qcom_scm_desc" 2019-11-16 02:27:45 -08:00
qctecmdr
dc9a5781ad Merge "firmware: qcom_scm: Remove unused qcom_scm_get_version" 2019-11-16 01:46:20 -08:00
qctecmdr
25a16eb963 Merge "firmware: qcom_scm: Order functions, definitions by svc/cmd" 2019-11-16 01:12:08 -08:00
qctecmdr
ac0d8084e8 Merge "firmware: qcom_scm: Apply consistent naming scheme to command IDs" 2019-11-16 00:39:01 -08:00
qctecmdr
1951d5023d Merge "firmware: qcom_scm-64: Make SMCCC macros less magical" 2019-11-15 23:57:19 -08:00
qctecmdr
86d26b10fa Merge "firmware: qcom_scm: Add funcnum IDs" 2019-11-15 23:24:20 -08:00
qctecmdr
0115d870b8 Merge "firmware: qcom_scm: Rename macros and structures" 2019-11-15 22:48:28 -08:00
qctecmdr
01982fba17 Merge "firmware/qcom_scm: Add scm call to handle smmu errata" 2019-11-15 22:06:18 -08:00
qctecmdr
2c87407cf7 Merge "msm: ipa4: Fix to overcome KW issues" 2019-11-15 20:26:53 -08:00
qctecmdr
47acbf95eb Merge "soc: qcom: secure_buffer: Add missing dma_unmap_single" 2019-11-15 18:49:04 -08:00
Praveen Kurapati
59ed200680 msm: ipa3: Fix to memory allocation failure
During IPA shutdown the allocation for memory request fails.
Add changes in IPA to not sleep while memory allocation.

Change-Id: I0adb09e32970ff1d67c3249bb9d3c9dbdc970a8a
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2019-11-16 08:06:59 +05:30
qctecmdr
7165f40b45 Merge "arm64: defconfig: Enable CVP driver" 2019-11-15 18:10:52 -08:00
George Shen
293f99a9cf arm64: defconfig: Enable CVP driver
Enable CVP driver for Lahaina.

Change-Id: I7ee692c24595ac3c436203c9ebb12c1b9844da68
Signed-off-by: George Shen <sqiao@codeaurora.org>
2019-11-15 14:45:33 -08:00
Chris Goldsworthy
903fe10e59 soc: qcom: secure_buffer: Add missing dma_unmap_single
Add a missing dma_unmap_single() that was accidentally deleted when adding
tracepoints in the secure_buffer driver.

Change-Id: I8159bee354b4debffb2a55165d2e543d5979daff
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
2019-11-15 14:08:45 -08:00
Elliot Berman
2e88beb181 firmware: qcom_scm: Support SCM calls before qcom_scm probe
Lazily initialize qcom_smc_convention with a wrapper. Required for
SCM calls that occur before qcom_scm probe time.

Change-Id: I408b7ac6efc62b7e88846bc4769d66fccf2e7c0a
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Elliot Berman
bdce17645f firmware: qcom_scm: Enable legacy convention in qcom_scm-64.c
Enable legacy calling convention in qcom_scm-64. Add enum to represent
current calling convention being used. Update is_call_available to use
legacy function numbers when using legacy convention.

Change-Id: I4aa1364f219d4db68c03023e63009a53326ecca5
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Elliot Berman
298983059d firmware: qcom_scm: Merge legacy and SMCCC conventions
Copy/paste legacy SCM driver into qcom_scm-64 with the following notes:
- Renamed qcom_scm_call in qcom_scm-32 to qcom_scm_call_legacy in the
  copy.
- Renamed qcom_scm_call_atomic in qcom_scm 32 to
  qcom_scm_call_atomic_legacy in the copy.
- Rename __qcom_scm_call_smccc to qcom_scm_call_smccc.
- Filled in implementations set_cold_boot_addr, set_warm_boot_addr, and
  cpu_power_down from qcom_scm-32.c.
- set_dload_mode, io_writel, io_readl now use atomic variants as in
  qcom_scm-32.

Change-Id: Ifa72ded7d6150bef08c6a0451d422b0782e8320a
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Elliot Berman
3919d02c8c firmware: qcom_scm-32: Add device argument to atomic calls
Add this unused parameter to reduce merge friction between SMCCC and
legacy based conventions.

Change-Id: Ie31b220d751ae08430b3e89d41de0217e5213435
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Elliot Berman
c6ed70021e firmware: qcom_scm-32: Create common legacy atomic call
Downstream SCM driver legacy atomic calling convention supports up to 5
arguments and 3 return values. Create one function to support this
combination.

Change-Id: I516d920e00d6da99a1f8290c2ed8654c75f268f9
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Elliot Berman
5f51f469b5 firmware: qcom_scm-32: Fill SMCCC register in qcom_scm_call
- Move SMCCC register filling to qcom_scm_call so that qcom_scm_call_do
  only needs to concern itself with retry mechanism.
- Use arm_smccc_args struct in atomic variants as well.

Change-Id: I435d974724118943084f618f63fffb1109d1cfe0
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Elliot Berman
b6d0faef1b firmware: qcom_scm-32: Use qcom_scm_desc in non-atomic calls
Use qcom_scm_desc in non-atomic calls to remove legacy convention
details from every SCM wrapper function.

Change-Id: I6962d86b0a8edcedf0d7fe7700794aa8bfdac430
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Elliot Berman
b2c9a7b7b6 firmware: qcom_scm-32: Use SMC arch wrappers
Use SMC arch wrappers instead of inline assembly.

Change-Id: Ia8b8518f842462eb3f7e0d3200497431ca9c2c4e
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Elliot Berman
ea0f09d683 firmware: qcom_scm-64: Improve SMC convention detection
Improve the calling convention detection to use qcom_scm_call_atomic
and not blindly assume 32-bit mode if the checks fails.

__qcom_scm_is_call_available() cannot be used directly here as we want
an atomic variant of is_call_available(). This is also a necessary
requirement later when merging in legacy convention.

Change-Id: I66beec550d05afde6c680d256183e8ad207d7268
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Elliot Berman
6b99839901 firmware: qcom_scm-64: Fill SMC registers in qcom_scm_call_smccc
qcom_scm_call_smccc should be responsible for converting qcom_scm_desc
into arguments for smc call. Consolidate the dispersed logic to convert
qcom_scm_desc into smc arguments inside qcom_scm_call_smccc.

Change-Id: Ieae23c5fc6c77dbd76ef28dc4040b0f64de872c0
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Elliot Berman
8853f6612d firmware: qcom_scm-64: Remove qcom_scm_call_do_smccc
Remove thin wrapper to qcom_scm_call_do_smccc because it doesn't do
enough of anything interesting to dedicate its own function.

Change-Id: Ia726336e4dc14f0a473a86d6c15605a4a020b055
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Elliot Berman
abe9598276 firmware: qcom_scm-64: Add SCM results to descriptor
Remove knowledge of arm_smccc_res struct from client wrappers so that
client wrappers only work QCOM SCM data structures. SCM calls may have
up to 3 arguments, so qcom_scm_call_smccc is responsible now for filling
those 3 arguments accordingly.

Change-Id: I9712f75f6bea0a6528ccd5a69bc1602493574e19
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Elliot Berman
40ea361077 firmware: qcom_scm-64: Move svc/cmd/owner into qcom_scm_desc
Service, command, and owner IDs are all part of qcom_scm_desc struct and
have no special reason to be a function argument (or hard-coded in the
case of owner). Moving them to be part of qcom_scm_desc struct improves
readability.

Change-Id: I422e5b0c2c117ff4eafc80f16b34874ff86643d3
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Elliot Berman
22afda04ff firmware: qcom_scm: Remove unused qcom_scm_get_version
Remove unused qcom_scm_get_version.

Change-Id: I7e638d3ece7a2d52b51f570bb680cf3c5dcdc347
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Elliot Berman
7254c9cde6 firmware: qcom_scm: Order functions, definitions by svc/cmd
Definitions throughout qcom_scm are loosely grouped and loosely ordered.
Sort all the functions/definitions by service ID/command ID to improve
sanity when needing to add new functionality to this driver.

Change-Id: I698443e8e650d4bc9e65ac27d68c46d1e45ba8e3
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Elliot Berman
2cfb4a6532 firmware: qcom_scm: Apply consistent naming scheme to command IDs
Create a consistent naming scheme for command IDs. The scheme is
QCOM_SCM_##svc_##cmd. Remove unused macros QCOM_SCM_FLAG_HLOS,
QCOM_SCM_FLAG_COLDBOOT_MC, QCOM_SCM_FLAG_WARMBOOT_MC,
QCOM_SCM_CMD_CORE_HOTPLUGGED, and QCOM_SCM_BOOT_ADDR_MC.

Change-Id: I88cb9ff6d29ec253a853422557a31856fae7477c
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Elliot Berman
414a9a7c81 firmware: qcom_scm-64: Make SMCCC macros less magical
Improve understandability of SMCCC macros as they are all functions of
how many arguments can be shoved in registers and how many SCM arguments
are supported.

Change-Id: Iac0378fc4c5e20943a64b98223d53caa4955dd53
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Elliot Berman
4d2296c9e6 firmware: qcom_scm: Add funcnum IDs
Add LEGACY_FUNCNUM to qcom_scm-32.c and move SMCCC_FUNCNUM closer to
other smccc-specific macros.

Change-Id: I385f0b5ba31cb14e304617d5aa67b37dc3c33c9c
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00