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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Qcom's smmu-500 needs to toggle wait-for-safe sequence to
handle TLB invalidation sync's.
Few firmwares allow doing that through SCM interface.
Add API to toggle wait for safe from firmware through a
SCM call.
Change-Id: I425b4dda32f285996178540e551e3168c51da610
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Acked-by: Andy Gross <agross@kernel.org>
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Patch-mainline: https://lore.kernel.org/patchwork/patch/1129993/
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
There are scnenarios where drivers are required to make a
scm call in atomic context, such as in one of the qcom's
arm-smmu-500 errata [1].
[1] ("https://source.codeaurora.org/quic/la/kernel/msm-4.9/
tree/drivers/iommu/arm-smmu.c?h=msm-4.9#n4842")
Change-Id: I5b313e6629a7ea54055c2cd83d439f5f0d9069c1
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Acked-by: Andy Gross <agross@kernel.org>
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Patch-mainline: https://lore.kernel.org/patchwork/patch/1129992/
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
PMIC Glink driver provides the interface for the clients to
communicate over GLink for sending and receiving the data to
charger PD firmware that runs on ADSP which supports charging
and gauging.
This enable the clients to read/write and get notifications on
battery charging parameters.
Change-Id: I2747a86d88dac571bd7e4b8c6dfcd7b8ac596e4b
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
The PMIC Glink driver provides the interface for clients to
communicate over GLink for sending and receiving data to charger
firmware that runs on a remote subsystem (e.g. ADSP) which
supports charging and gauging.
This enables clients to read/write battery charging parameters
and get notifications.
Change-Id: I1e4c09d1ee10c8c5397f4459afe8d656593d718a
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Enable BT driver as module in defconfig on Lahaina
Change-Id: Idad7e5fb276e1fa7c4a371fcebad81e453c50422
Signed-off-by: Umesh Vats <uvats@codeaurora.org>
Correct the validation of number of dma entries in DMA table
to overcome the out-of-bounds access to dma buffers array.
And make changes to initialize an uninitialized variable
which may contain junk data.
Change-Id: Ia05082c887548e58831ab7dfae42cba97ec13fec
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
IMD command syntax fix for increment and adding a return
condition for parameter check.
Change-Id: I3e171bd09c3a4ae0d679348186cae1f87da076fe
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>