Commit graph

889,492 commits

Author SHA1 Message Date
Branden Bonaby
04085c1d11 soc: qcom: Add qcom watchdog framework support
Refactor the soc watchdog driver to use the
qcom watchdog framework.

Change-Id: I12a6afff4299bb39cacca27bcf483e08a503add0
Signed-off-by: Branden Bonaby <[email protected]>
2020-08-18 12:17:55 -07:00
Branden Bonaby
065a08cb14 soc: qcom: Create framework for qcom watchdogs
Separate core watchdog functionality from the qcom watchdog
driver to create a framework for other qcom watchdogs. This
will reduce the duplication of code for future watchdog
drivers and allow them to take advantage of this framework.

Change-Id: I1234af9d92de6841bd09157042a4fbba1745f11b
Signed-off-by: Branden Bonaby <[email protected]>
2020-08-18 12:17:42 -07:00
Branden Bonaby
d71acda6dc soc: qcom: Remove watchdog percpu interrupts
Refactor watchdog core to remove the bark percpu
interrupt as it is deprecated and no longer used
by the watchdog.

Change-Id: Idbd959a7b42895d72f4f812057304687f7aca948
Signed-off-by: Branden Bonaby <[email protected]>
2020-08-18 12:17:25 -07:00
Branden Bonaby
2492da5ed7 soc: qcom: Remove unused member variables
Refactor watchdog core to remove unused member
variables in the watchdog data structure.

Change-Id: I3a83fdb291064f25721549a3fe70f97629c148b4
Signed-off-by: Branden Bonaby <[email protected]>
2020-08-18 12:17:10 -07:00
Branden Bonaby
6bf6e305d3 soc: qcom: Remove unused macros
Refactor watchdog core to remove unused macro constants.

Change-Id: If8517c2c5be519393b8c0394034554533952abd1
Signed-off-by: Branden Bonaby <[email protected]>
2020-08-18 12:17:01 -07:00
Branden Bonaby
70ca2d9b82 soc: qcom: Remove watchdog slack accounting
Refactor watchdog core to remove dead code. Specifically,
the slack variables from the watchdog data structure and
the pet function that uses them. Currently these variables
are not used and can be refactored to simply reset the
watchdog counter directly.

Change-Id: Ie184e2826ed790288a94dfebf578ec99b53831e8
Signed-off-by: Branden Bonaby <[email protected]>
2020-08-18 12:16:38 -07:00
Branden Bonaby
caf6b22e22 arm64: defconfig: Add watchdog core config
Add the config for the  core watchdog framework.

Change-Id: Idfde28614cb5d7ac239c193ff6374ad5b753e366
Signed-off-by: Branden Bonaby <[email protected]>
2020-08-18 12:16:08 -07:00
Branden Bonaby
54100ecff9 soc: qcom: Rename msm watchdog to wdt core
In preparation to change the qcom watchdog to a new core
framework that future watchdog drivers will utilize, the name
of the file needs to be changed. Due to the number of changes
needed in the file we need to rename it to reflect its new purpose.

Change-Id: Iac6ad57fbc02866f6716a44d7bb4a62d97e4a810
Signed-off-by: Branden Bonaby <[email protected]>
2020-08-18 12:16:00 -07:00
Branden Bonaby
cce9844ff5 soc: qcom: Remove msm watchdog config
Remove qcom watchdog config in preparation for the
creation of the watchdog core.

Change-Id: I964285a5ad06dc5753756d821bd0f4fc1d664739
Signed-off-by: Branden Bonaby <[email protected]>
2020-08-18 12:15:36 -07:00
qctecmdr
adbbbc5659 Merge "msm: kgsl: Add A660 specific registers to snapshot" 2020-08-18 11:52:27 -07:00
Konstantin Dorfman
36b3a8c418 aarch64: ABI: add kernel_restart to GKI KMI symbol list
Change adds kernel_restart to qcom KMI symbol list and updates
the ABI snapshot, as it is used by spss_utils driver.

Change-Id: Iedb73f0aeb092989461078cc403695e24fbe8146
Signed-off-by: Konstantin Dorfman <[email protected]>
2020-08-18 21:29:05 +03:00
Manu Gautam
d279640225 mhi: core: Add checks for bhi and bhie offsets
Bail out if device returns invalid bhi/bhie offsets.

Change-Id: Ifc92c53a4c1f7c951721cbec0b1d7285cf19cd72
Signed-off-by: Manu Gautam <[email protected]>
2020-08-18 10:26:26 -07:00
Manu Gautam
775e234a67 cnss2: Update device MMIO region length for MHI core
It can be used by MHI core to have a sanity check for
bhi and bhie offsets reported by device.

Change-Id: Ibcdef53a4c1f7c951721cbec0b1d7285cf19cd72
Signed-off-by: Manu Gautam <[email protected]>
2020-08-18 10:26:04 -07:00
Hemant Kumar
c61705f68b mhi: core: Skip RDDM download if execution env is unknown
If mhi_get_exec_env API returns MHI_EE_MAX skip RDDM download.
API returns this value if BHI offset read failed or BHI_EXECENV
register read fails. This indicates the underlying transport is
unresponsive so there is no need to trigger RDDM using SYSERR
or request SOC reset.

Change-Id: I0cc85af84f19b425c94fe8aea987ab03af6de032
Signed-off-by: Hemant Kumar <[email protected]>
2020-08-18 10:23:27 -07:00
Hemant Kumar
6e8d77cd33 mhi: core: Add NULL check in mhi_get_exec_env
In case power up failed due to incorrect bhi offset
bhi pointer in mhi controller remains NULL. Later if
MHI controller forces RDDM it checks the execution
environment by accessing the BHI offset. This results
into NULL pointer dereference. Fix this by adding NULL
check for both mhi controller and bhi pointer before
reading the BHI offset.

Change-Id: I93f8918d7d595a77a5c8bcb6fd610f1a2b484fc4
Signed-off-by: Hemant Kumar <[email protected]>
2020-08-18 10:23:06 -07:00
qctecmdr
fcbd6f2815 Merge "scsi: ufs: Fix some racing problems in ufshcd_shutdown()" 2020-08-18 09:26:21 -07:00
Isaac J. Manjarres
5e3ebb30e2 soc: qcom: mem-buf: Relinquish unclaimed donated memory
A memory request may not be satisfied in time because of delays
in allocation times. When the allocation response is given to the
consumer, but the consumer's request has already timed out, the
memory will be leaked, as it won't be claimed by the consumer, and
it won't be relinquished to the supplier. Thus, to prevent the memory
from being leaked, relinquish unclaimed memory back to the supplier.

Change-Id: I91f52113c26f4536789fe6807175c845cc9c9e26
Signed-off-by: Isaac J. Manjarres <[email protected]>
2020-08-18 08:41:28 -07:00
Isaac J. Manjarres
7fd846f325 soc: qcom: mem-buf: Use an unbound high priority workqueue for mem-buf
Use an unbound high priority workqueue to ensure that mem-buf
transactions can be handled on any CPU, as well as with high
priority. Also, increase the timeout for allocation responses
from 2 seconds to 3.5 seconds.

Change-Id: I2ec4d85bf7307d64d2f8a7dae6dfb2b29cfc45bb
Signed-off-by: Isaac J. Manjarres <[email protected]>
2020-08-18 08:41:18 -07:00
qctecmdr
cef19e9ec9 Merge "msm: kgsl: skip if requested address doesn't fall in the svm range" 2020-08-18 07:04:31 -07:00
Shyam Kumar Thella
8d77be5b92 power: qpnp-smb5: Fix Initialize mutex for PD typec designs
Dump stack is observed when mutex (typec_lock) is locked without
initializing it in case of PD supported typec designs. Fix it by
initializing the mutex for PD supported typec designs also.

Change-Id: I7ee29715651dc001a450d80c49c6cce10f10e837
Signed-off-by: Shyam Kumar Thella <[email protected]>
2020-08-18 06:16:18 -07:00
qctecmdr
5927fac03f Merge "soc: qcom: add microdump collector" 2020-08-18 04:33:28 -07:00
qctecmdr
216a9df69f Merge "usb: xhci: Reduce command abort handshake timeout" 2020-08-18 04:33:28 -07:00
qctecmdr
4cf691d25d Merge "mhi: core: Set bhi and bhie to NULL upon power down" 2020-08-18 04:33:28 -07:00
qctecmdr
53582a2632 Merge "msm: kgsl: Mark the scratch buffer as privileged" 2020-08-18 04:33:27 -07:00
Yuanfang Zhang
8bbbd5c5f2 coresight: tmc: Modified trigger number for reset CTI
Modified trigger number for reset CTI to 5.

Change-Id: Ia5c5edf9b71176bdaead06b265d4203b81342c88
Signed-off-by: Yuanfang Zhang <[email protected]>
2020-08-18 19:27:58 +08:00
Pavankumar Kondeti
dbb563984a sched/walt: Improve the scheduler
This change is for general scheduler improvement.

Change-Id: I5e27121c3625d21d0a5abedcda9bcbfc947f5359
Signed-off-by: Pavankumar Kondeti <[email protected]>
2020-08-18 12:22:45 +05:30
Hemant Kumar
3e0d1c8b21 mhi: core: Set bhi and bhie to NULL upon power down
Set the bhi and bhie pointers to NULL as part of clean
up. This makes sure that stale pointers are not accessed
in case the bhi or bhie is failed to initialize during
power up.

Change-Id: Iddbd3a8234ff4d384ab03081479d55faf10d9443
Signed-off-by: Hemant Kumar <[email protected]>
2020-08-17 23:18:36 -07:00
Shawn Shin
3eadb769c6 soc: qcom: add microdump collector
Collects data from SMEM region when modem crashes
and stores it under /dev to expose to user space.

Change-Id: I6b79a2ea7f7d9d7507e8c44dd1d385a185759ac1
Signed-off-by: Shawn Shin <[email protected]>
2020-08-17 21:52:12 -07:00
qctecmdr
4c39afb36f Merge "drivers: thermal: don't reset ops pointer in of-thermal sensor unregister" 2020-08-17 21:17:59 -07:00
qctecmdr
5277fb38c4 Merge "sched/walt: Improve the scheduler" 2020-08-17 21:17:58 -07:00
Fenglin Wu
880117aa48 input: qcom-hv-haptics: toggle CAL_EN mode if HBST is in open loop
When RC_CLK_CAL_EN is set in auto mode while haptics boost is working
in open loop, the first cycle of the vibration would be played
incorrectly because the haptics module couldn't get enough clock count
before the play gets triggered. Fix this by toggling the RC clock
calibration mode from disabled to auto mode.

Change-Id: I80b3c48b9bb508b12841a679eafa2c618771edf2
Signed-off-by: Fenglin Wu <[email protected]>
2020-08-18 11:00:58 +08:00
Fenglin Wu
7d3ecfd796 input: qcom-hv-haptics: read CAL_TLRA_CL_STS from SDAM after boot up
During LRA frequency calibration, reading CAL_TLRA_CL_STS has to be
done before de-asserting play. In the boot up LRA frequency calibration
sequence, CAL_TLRA_CL_STS was read out and stored in SDAM module
registers by the bootloader. Later, HLOS haptics driver can read it from
there and use it for calculating LRA frequency. This boot up LRA
frequency calibration sequence is only available for PM8350B 2.0 chip.
Update the driver to support this.

Change-Id: I0b81e79bad57160f9c79e01151e2d4060b4bbd41
Signed-off-by: Fenglin Wu <[email protected]>
2020-08-18 08:11:17 +08:00
Fenglin Wu
cf23f6122f input: qcom-hv-haptics: update RC_CLK_CAL_COUNT calculation
RC_CLK_CAL_COUNT is the calibration count used in manual RC_CLK_CAL
mode when playing FIFO patterns. For haptics module in PM8350B 2.0,
there are new equations recommended to calculate RC_CLK_CAL_COUNT
based on CAL_TLRA_CL_STS and LAST_GOOD_TLRA_CL_STS status to achieve
better accuracy. Update the driver to support this.

Change-Id: I983c1b1f284006847549d2b3d23a0c1039f8b4c1
Signed-off-by: Fenglin Wu <[email protected]>
2020-08-18 08:09:40 +08:00
qctecmdr
18046fc5a8 Merge "msm: kgsl: Add clocks to access KGSL SMMU register space" 2020-08-17 17:03:51 -07:00
qctecmdr
627cf1be0c Merge "clk: qcom: rpmh: Add support for RPMH clocks for sdxlemur" 2020-08-17 17:03:50 -07:00
qctecmdr
7fcf64dcc2 Merge "defconfig: Add support for ARM_APPENDED_DTB for sdxlemur" 2020-08-17 17:03:50 -07:00
qctecmdr
214b829cea Merge "cnss2: Check for FW / IMS status for WFC QMI messages" 2020-08-17 17:03:50 -07:00
qctecmdr
5395c50952 Merge "abi: Update qcom whitelist for netdev_update_features" 2020-08-17 17:03:49 -07:00
qctecmdr
52576b3bfe Merge "scsi: ufs: Add UFS_DEVICE_QUIRK_PA_HIBER8TIME quirk" 2020-08-17 17:03:49 -07:00
qctecmdr
296c1494f0 Merge "arch: arm64: Add RCU related configs for lahaina" 2020-08-17 17:03:48 -07:00
Raghavendra Rao Ananta
7c6e5b50c6 arch: arm64: Add RCU related configs for lahaina
Enable RCU NOCB_CPU and FAST_NO_HZ options for the lahaina. These configs
are needed to avoid frequent cpu wake up for processing rcu callbacks.

Whenever LPM governor driver has requested for sleep length
tick_nohz_get_sleep_length tries to find the next event from
tick_nohz_next_event function.

static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu)
{
...
        if (rcu_needs_cpu(basemono, &next_rcu) || arch_needs_cpu() ||
            irq_work_needs_cpu() || local_timer_softirq_pending()) {
                next_tick = basemono + TICK_NSEC;
        } else {

tick_nohz_next_event calls rcu_needs_cpu to find whether future
non-offloaded RCU-related work need to be done by the current CPU
or not. If any non-offloaded future callbacks are present rcu
framework requests the cpu to wake up for every tick period to
process the callbacks.

When CONFIG_FAST_NO_HZ is defined rcu_needs_cpu function checks whether
any callbacks are ready to process or not. If there are no ready
call backs and no non-offloaded callbacks pending for this CPU, RCU
doesn't need the CPU and returns KTIME_MAX for sleep length. Another
important thing is that, if CPU has lazy callbacks or future non-offload
RCU callbacks, rcu framework try to advance those callbacks and allows
the CPU to enter dyntick-idle mode.

RCU_NOCB_CPU config option helps to offload callback invocation from
the set of CPUs to kthread ("rcuox/N") and reduce OS jitter for
aggressive high performance computing workloads.

Change-Id: I47cdd2a3528e3a447a6909bf3f840ee8a3dd4b1e
Signed-off-by: Prasad Sodagudi <[email protected]>
Signed-off-by: Raghavendra Rao Ananta <[email protected]>
2020-08-17 14:28:36 -07:00
qctecmdr
67629947f6 Merge "arm: defconfig: Remove I3C driver support" 2020-08-17 14:28:17 -07:00
qctecmdr
653c55aeb1 Merge "msm: kgsl: Correctly clean up dma buffer attachment in case of error" 2020-08-17 14:28:17 -07:00
qctecmdr
a05f38a3be Merge "clk: qcom: gcc-lahaina: Enable clocks for pm8008 by default" 2020-08-17 14:28:17 -07:00
qctecmdr
e0a3bc6a40 Merge "msm: kgsl: Kick dcvs in idle thread for gmu targets" 2020-08-17 14:28:16 -07:00
qctecmdr
07ccc41cfc Merge "msm: adsprpc: Race conditions when handling the ADSP SSR" 2020-08-17 14:28:16 -07:00
qctecmdr
9f148ff2fe Merge "input: touchscreen: synaptics_tcm: defer probe if panel not found" 2020-08-17 14:28:16 -07:00
Urvashi Agrawal
65dc7023e6 msm: kgsl: Clean up adreno_spin_idle_debug
Make the debug function target specific since
it was anyways used in only two places and it also
simplifies a bunch of indirect register reads
we had to do because of ADRENO_REG enum.

Change-Id: I20fcd91339639d999d475dae60f95a357721b71d
Signed-off-by: Urvashi Agrawal <[email protected]>
2020-08-17 13:17:59 -07:00
Urvashi Agrawal
6407750451 msm: kgsl: Add LPAC information to snapshot
Add some bits of LPAC information to snapshot.

Change-Id: I4786e4817c9fa1fe778ee769c019069923b46024
Signed-off-by: Urvashi Agrawal <[email protected]>
2020-08-17 13:15:16 -07:00
Urvashi Agrawal
087af65bee msm: kgsl: Add A660 specific registers to snapshot
Some registers only exist on A660, add logic to capture
these into the snapshot.

Change-Id: I21bef72768cdb9597906ae9996c8988de1a00f7f
Signed-off-by: Urvashi Agrawal <[email protected]>
2020-08-17 13:14:44 -07:00