Commit graph

874,459 commits

Author SHA1 Message Date
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
Elliot Berman
5f79bd2348 firmware: qcom_scm: Rename macros and structures
Rename legacy-specific structures and macros with legacy prefix; rename
smccc-specific structures and macros with smccc prefix.

Change-Id: I501e38377f063e2ee27c1bc4b0a17426bb6e556e
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
Vivek Gautam
ae18db422f firmware/qcom_scm: Add scm call to handle smmu errata
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>
2019-11-15 11:03:52 -08:00
Vivek Gautam
c5691b4772 firmware: qcom_scm-64: Add atomic version of qcom_scm_call
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>
2019-11-15 11:03:52 -08:00
Elliot Berman
839919c528 defconfig: Enable QCOM_SCM on Lahaina QGKI
Enable QCOM_SCM on Lahaina QGKI.

Change-Id: I57c187810b1f234faf3548a8f17c915e259492ea
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-11-15 11:03:52 -08:00
qctecmdr
e22d4b67e1 Merge "spi: spi-msm-geni: Add SPI GENI driver snapshot" 2019-11-15 03:16:12 -08:00
qctecmdr
d6ed6ac63f Merge "soc: qcom: Add snapshot of watchdog driver" 2019-11-14 22:21:53 -08:00
qctecmdr
aed96b0763 Merge "defconfig: lahaina: Add QTI_PMIC_GLINK driver" 2019-11-14 21:47:07 -08:00
qctecmdr
1a9ad884b2 Merge "soc: qcom: Add PMIC Glink driver" 2019-11-14 21:13:38 -08:00
qctecmdr
ef91253b3e Merge "arm64: defconfig: Enable CONFIG_MSM_BT_POWER on Lahaina" 2019-11-14 20:33:58 -08:00
Subbaraman Narayanamurthy
5024997313 defconfig: lahaina: Add QTI_PMIC_GLINK driver
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>
2019-11-14 16:10:02 -08:00
Subbaraman Narayanamurthy
8a8cf6c692 soc: qcom: Add PMIC Glink driver
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>
2019-11-14 16:09:45 -08:00
qctecmdr
940bd3bb6c Merge "msm: ipa: IMD command bugfixes" 2019-11-14 15:48:35 -08:00
qctecmdr
6f43d51db4 Merge "msm: ipa: update ipa driver APIs for recent wakeup_source and dma" 2019-11-14 13:12:21 -08:00
qctecmdr
84d6d0bfe0 Merge "interconnect: qcom: add virt_clk provider and QUP nodes" 2019-11-14 12:02:31 -08:00
Umesh Vats
4b4ad41687 arm64: defconfig: Enable CONFIG_MSM_BT_POWER on Lahaina
Enable BT driver as module in defconfig on Lahaina

Change-Id: Idad7e5fb276e1fa7c4a371fcebad81e453c50422
Signed-off-by: Umesh Vats <uvats@codeaurora.org>
2019-11-14 10:42:30 -08:00
qctecmdr
37c922d8b6 Merge "platform: msm-geni-se: Add missing fixes from msm-4.19" 2019-11-14 10:32:15 -08:00
Michael Adisumarta
e55aa27630 msm: ipa: IMD command bugfixes
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>
2019-11-13 21:39:46 -08:00
Ghanim Fodi
db3d3302c1 msm: ipa: update ipa driver APIs for recent wakeup_source and dma
This change will ensure the APIs are updated correctly to the
latest for wakeup_source and dma functions.

Change-Id: Iaaffe6f876dab3824f7a8b72f9d71be686033a6b
Acked-by: Priyadarshini Rajagopal <prajagop@qti.qualcomm.com>
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
2019-11-13 20:37:17 -08:00
Meng Wang
a2ce4cbbe3 ASoC: core: Fix possible NULL pointer dereference
SSR is triggered when the system does not have a sound card
registered, but has codecs. The pointer card sent from codec driver
to snd_soc_card_change_online_state is NULL.
Add null check for soc_card before dereferencing.

Change-Id: I23342a6cbd9d53e62b2ea11dfe79aad3759df6f0
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2019-11-13 20:34:29 -08:00
qctecmdr
9a9fb3e2cd Merge "arm64: Kconfig: Don't select COMMON_CLK_QCOM in ARCH_LAHAINA" 2019-11-13 17:41:27 -08:00
qctecmdr
e2130b20f0 Merge "arm64: defconfig: Enable cam cc clock driver for Lahaina" 2019-11-13 14:06:05 -08:00
Prakruthi Deepak Heragu
cb79e737ae soc: qcom: Add snapshot of watchdog driver
This is a snapshot of watchdog driver as of msm-4.19 commit
<5a4fd734e3e0e76c8e0819c47eb0d333e09d0f9f>. (Merge "msm: audio: support
for gapless_pcm").

Change-Id: I8b683c8b5c4c56f328d0025b2829f42105d03940
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
2019-11-13 13:42:28 -08:00
qctecmdr
2d12159fa6 Merge "Subject: [PATCH 2/3] ABI: aarch64: Update ABI snapshot based on v5.4-rc6" 2019-11-13 13:33:16 -08:00
qctecmdr
71c01ac3f6 Merge "Merge remote-tracking branch 'remotes/origin/tmp-aefd2d632eb0' into msm-lahaina" 2019-11-13 12:46:13 -08:00
qctecmdr
708c2fd53a Merge "msm: cvp: Port CVP driver to 5.x kernel" 2019-11-13 11:37:06 -08:00
David Dai
c4448eb8d0 interconnect: qcom: add virt_clk provider and QUP nodes
Add virtual QUP bus nodes to separate out bandwidth requests
and clock votes to allow for independent control.

Change-Id: I8d5a171e60b2e76db83e1d5a27f4cdfe4a1408d9
Signed-off-by: David Dai <daidavid1@codeaurora.org>
2019-11-13 11:08:47 -08:00
qctecmdr
7d7f446298 Merge "ASoC: core: update NAME_SIZE to 64" 2019-11-13 11:02:10 -08:00
Subramanian Ananthanarayanan
e21fd7a31e platform: msm-geni-se: Add missing fixes from msm-4.19
Add missing fixes from msm-4.19 QUPV3 common driver file.

Change-Id: Ib85d8b8542b19a51872f785af0421e9275ed8cf4
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
2019-11-13 18:05:35 +05:30
qctecmdr
e2c1998133 Merge "ALSA: core: Expose sound card online/offline state" 2019-11-13 01:49:49 -08:00
qctecmdr
e0aca1e961 Merge "msm: adsprpc: update driver to latest version from msm-4.19" 2019-11-12 16:56:19 -08:00
Murali Nalajala
b4e51227e5 Subject: [PATCH 2/3] ABI: aarch64: Update ABI snapshot based on v5.4-rc6
Update the ABI signature for aarch64 based on v5.4-rc6 (with symbol
namespace support disabled).

This snapshot is taken based of kernel/build:
https://android.googlesource.com/kernel/build/+/0a4f497803a2f3f2a162ca1176d082924d7764f1

Change-Id: Id20fa5f5903e7e262f4688382a4828db0aa51ac0
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
2019-11-12 16:51:04 -08:00
Tharun Kumar Merugu
524cdbf341 msm: adsprpc: update driver to latest version from msm-4.19
Update fastrpc driver files to the latest version from msm-4.19
branch.

Change-Id: Ia8b76d42c78974bf2cbb27d022939fc1dfd5f7b1
Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
2019-11-12 13:07:48 -08:00
Michael Adisumarta
2c927c2f32 msm: gsi: close coal frame before HPS CLEAR
Close the coaleascing frame before control sequences involving
coalescing to ensure HPS is idle and that there are no open
coalescing frames/contexts.

Change-Id: I5914b7d64c58a7e557854df6fa2c6fc15a4e21df
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2019-11-12 11:12:41 -08:00
George Shen
ffe925cbca msm: cvp: Port CVP driver to 5.x kernel
Add new CVP feature support. Make CVP driver work with 5.x kernel:

Modified bus and ion function calls. Modified synx and firmware
version function calls. Demodulized CPU-DSP driver interface. Added
Lahaina platform configuration. Enable building CVP driver as DLKM.

Change-Id: I8a0a21b3ae87c19bf4e59bed16e9dba304503cc6
Signed-off-by: George Shen <sqiao@codeaurora.org>
2019-11-12 10:28:06 -08:00
qctecmdr
a203c595ba Merge "msm: ipa4: Fix to use common PM handle for coalescing and default pipe" 2019-11-12 07:11:34 -08:00
qctecmdr
4c92e30fe3 Merge "msm: ipa3: Fix to race condition in updating current polling state" 2019-11-12 06:37:38 -08:00
Ashok Vuyyuru
c43c35122e msm: ipa3: Fix to race condition in updating current polling state
Configure the callback mode only one time after starting the channel
otherwise observing IEOB interrupt received before configure callback
mode second time. It was leading race condition in updating current
polling state.

Change-Id: I35cdf77ee564ca82d9ff3e0cc6a58a88e8cbb471
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2019-11-12 16:03:16 +05:30
Ashok Vuyyuru
923071b346 msm: ipa4: Fix to use common PM handle for coalescing and default pipe
Because of using different PM handles default WAN consumer handle never
unvote data pending in suspend scenarios. Add changes to use the common
PM handle for default and coalescing pipes.

Change-Id: I2d6ff2998e7b80f11bdb7cfcd787cab098eaf718
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2019-11-12 15:55:18 +05:30
Meng Wang
1e9c3eb4e4 ASoC: core: update NAME_SIZE to 64
Sometimes the DAPM widget info is longer than 32.
Update NAME_SIZE to 64 to resolve it.

Change-Id: Iadcba84c61285ecdbccf4950b83f1d89aca5897b
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-11-12 16:07:24 +08:00
Vivek Aknurwar
7f57959a9a arm64: defconfig: Enable cam cc clock driver for Lahaina
Enable cam cc clock driver to support camera clocks for
camera peripherals.

Change-Id: I589bf1b8e416ff235d0a97a5864d61dbbe0c4fe0
Signed-off-by: Vivek Aknurwar <viveka@codeaurora.org>
2019-11-11 21:55:37 -08:00