Commit graph

892,914 commits

Author SHA1 Message Date
Prateek Sood
8569bead28 soc: wdog: implement irq tracker to get stats
Implement IRQ tracker for information:
1) Top 10 device IRQ's with count.
2) Per cpu total irq counts.
3) Per IPI total count.
Tracker will be invoked from watchdog pet,
watchdog bark and kernel panics.

Change-Id: I5159e122e25a7bbf389be4d5f57753378c7afb6d
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
2020-09-04 20:49:29 +05:30
Vikram Sharma
2e8f5628ef dt-bindings: msm: Add bindings for MFHDR fuse support
New feature bit for MFHDR is added in binding file.

CRs-Fixed: 2770220
Change-Id: Ic0a0059df707dd51efce04b1892803ab8cbae0de
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
2020-09-04 07:40:19 -07:00
Jishnu Prakash
377eacc4b2 power: qpnp-smb5: Update the interrupt handler names
It is observed that interrupt handlers with same names across drivers
are being incorrectly mapped. Until this is fixed and to align the names
with the driver name, update the interrupt handler names.

Change-Id: Ib2aea77c0b0e53ff99c34fafc531a5291f70449c
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2020-09-04 07:09:53 -07:00
Peter Wuw
71692ac54d ANDROID: GKI: add abi_gki_aarch64_oneplus
Add some symbols to symbol list included by oem modules.

Bug: 165594476
Change-Id: Ib6113961bd18f8ca0c6e41fe30768fd3fba3d2ea
Signed-off-by: Peter Wuw <peter.wuw@oneplus.com>
[ shorted the list to get the initial file mergable, more symbols can be
  added later - gregkh]
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-09-04 15:33:39 +02:00
Charan Teja Reddy
aa3fa08df4 mem-offline: improve the effective utilization of movable zone
When a memory block in a movable zone is onlined, only newly allocated
or swap in anon pages will fill it. This means that the migrated pages
from these memory blocks during offlining will sit in the lower zones
despite enough free space in the movable zone thus leaving pressure in
the lower zones. This pressure can effect the performance for the
allocations which can only be satisfied from lower zones.
This is avoided by filling in eligible pages from normal zone to movable
zone thus results in effective utilization of movable zone and also free
up memory in the lower zones.

Change-Id: I3404b9078e942c98f497cb462bc24fc53fb075ba
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2020-09-04 06:15:14 -07:00
Veerabhadrarao Badiganti
e0c9c1fe3c scsi: ufs-qcom: configure ufs clocks core memory
Configure the ufs clocks core and peripheral memory state when
turned off. This configuration is required to allow retaining
ICE crypto configuration (including keys) when ice_core_clk is
turned off, and powering down non-ICE RAMs of host controller.

Change-Id: I93584851fd50c7006ccd48979087d707ab4c6408
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[vbadigan@codeaurora.org: updated clk_set_flag API with new API]
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
2020-09-04 18:26:34 +05:30
Pratham Pratap
c2ee1fcf36 usb: pd: Clear send_get_status flag in protocol reset
Consider a scenario where a connected PD partner has sent an
alert message to the device and driver marked send_get_status
to true and queued usbpd_sm work with a delay of 150ms. Now,
if the cable gets disconnected before the start of usbpd_sm
work then send_get_status flag will not get cleared anywhere.
On the next cable plug-in, in PE_SNK_READY driver will
unnecessarily send Get_Status again which is incorrect and
may lead to soft/hard reset causing the PD partner to disconnect.
Fix this by clearing the send_get_status flag in the protocol reset.

Change-Id: I4747b0a25a0870e83ff78e0b9ccd7e3fd91ed9e6
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
2020-09-04 03:52:05 -07:00
Neeraj Upadhyay
4aa9d65d44 Minidump: Add registration/update support for suspend context
Add support for registering (and updating) suspend context in
minidump. This is helpful for cases, where suspend/resume
path is stuck.

Change-Id: I7ea9d4bcba85a4a0a2336279a3ffade918d1bd77
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2020-09-04 03:39:52 -07:00
Neeraj Upadhyay
49148c6626 soc: qcom: Handle device hangs during suspend/resume
As cpus can serve ipis and timers during suspend and
resume; msm watchdog would periodically pet hardware,
even when some of suspend/resume callbacks are stuck,
due to software deadlocks. This can cause device hangs,
particularly when noirq callbacks are stuck. To recover
from this, register late suspend (and early resume)
callbacks in msm watchdog; these callbacks would
disable/enable watchdog pet.

Change-Id: Id12251f2bb6565b04a59802a53b6c3cadd017327
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
2020-09-04 03:39:38 -07:00
Neeraj Upadhyay
62ea1d38b6 soc: qcom: Move watchdog suspend/resume callbacks to syscore ops
Move suspend resume callbacks to syscore ops, to ensure that
watchdog is kept enabled while _noirq callbacks are run; to
catch any watchdog hang during these callbacks run.

Change-Id: I5ef61eb2ce2cd74a07847d6f5ff048a7b27b95a1
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
2020-09-04 03:39:16 -07:00
Lingutla Chandrasekhar
c2757a4d9c Minidump: Add support for cpu current stack
Currently cpu's current stack are being dumped only in
panic path, which is not always helpful. So extend it to
be always dumped for any type of reset reasons.

For every task switch of cpu, update the minidump table with
latest stack. so that we can reconstruct callstack of cpu
for any type of resets.

Change-Id: Ia57a8e0473d3706efc9a88c91fb1dd60523648ad
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2020-09-04 03:38:58 -07:00
Huang Yiwei
a5eb013bd3 pstore: Register pstore reserved memory into Minidump
Register pstore reserved memory into Minidump to dump
the content in pstore when crash happens.

Change-Id: Ibc86c388715f53887362c9bacea4eb0217e89253
Signed-off-by: Huang Yiwei <hyiwei@codeaurora.org>
2020-09-04 18:26:29 +08:00
Lingutla Chandrasekhar
465231e616 Minidump: Add update region support for minidump regions
Add support to update client's entry physical/virtual addresses,
which is useful for DLKM, dynamic address changing clients.

Currently, msm_minidump_add_region() returns 0 on success, instead
of that, return 'region number' of the entry in the minidump table.

So clients who wants to update their address in future, needs to
book keep their entry in minidump table.

Change-Id: I03abbbd87bf6d2e11cf637525412d352772821cf
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2020-09-04 15:41:56 +05:30
Shadab Naseem
381a274b9b soc: qcom: eud: Do not fail the EUD probe for secure device
TCSR register scm write is configured to fail for secure device.
This results in eud probe failure. As dwc3 driver's probe is
dependent on eud probe to be successful, ignore the register
write failure.

Change-Id: I3dc658bd89d2dacb636532d4b08b9aa3986a62e6
Signed-off-by: Shadab Naseem <snaseem@codeaurora.org>
2020-09-04 14:54:18 +05:30
Giuliano Procida
7b433370b3 ANDROID: GKI: prevent removal of monitored symbols
For aarch64 GKI builds, enable KMI_SYMBOL_LIST_ADD_ONLY.

Bug: 165839948
Change-Id: I5564da9ec054ae003a28f01a41dbeede6ab23afb
Signed-off-by: Giuliano Procida <gprocida@google.com>
2020-09-04 08:08:40 +00:00
Sarthak Garg
8a53211a41 mmc: sdhci-msm: Add the missing check in sdhci_msm_check_power_status
On multi-card tray designs, the same card-tray would be used for SD
card and SIM cards. If SD card is placed at the rightmost location
in the tray, then SIM card may come in contact with SD card power-
supply while removing the tray. It may result in SIM damage.

So in sdhci_msm_handle_pwr_irq we skip the BUS_ON request when the
SD card is removed to be in consistent with the MGPI hardware fix to
prevent any damage to the SIM card in case of mult-card tray designs.

But we need to have a similar check in sdhci_msm_check_power_status to
be in consistent with the sdhci_msm_handle_pwr_irq function.

Change-Id: Ia3248139f351fa80dde163f805fa072cb298f39b
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2020-09-04 13:18:21 +05:30
Sandeep Singh
93029831bd icnss: Allow register/unregister driver execution in serial manner
In cases when wlan driver probe is in progress, icnss driver
rejects wlan driver unregister as driver probe is not completed.
This change enables wlan unregister driver to get scheduled
in icnss driver wq if wlan driver has been regsitered. This
ensures that wlan unregister and register driver get executed
in serial manner. In cases when driver probe is in progress and
wlan driver unregister gets called, unregister driver will be
processed when wlan driver probe is finished.

Change-Id: I0266723d081e9036ecbec122c56be8dfe3c3d1bb
Signed-off-by: Sandeep Singh <sandsing@codeaurora.org>
2020-09-04 13:08:20 +05:30
Tanwee Kausar
5e3618d4ee crypto: Fix possible stack out of bound error
Adding fix to check the upper limit on the length
of the destination array while copying elements from
source address to avoid stack out of bound error.

Change-Id: Ieb24e8f9b4a2b53fbc9442b25d790b12f737d471
Signed-off-by: Tanwee Kausar <tkausar@codeaurora.org>
2020-09-04 00:04:17 -07:00
Neeraj Upadhyay
b76161f6ac soc: qcom: Register irq stacks with minidump
Register irq stacks, so that irq context is correctly
captured in minidumps.

Change-Id: Iabafe0464961a0c25164d66a186846290fbfcafb
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2020-09-03 23:53:26 -07:00
Can Guo
a4ecc72fcd mmc: sdhci_msm: Allow turning off SD card's power during initialization
As per eMMC specification, device should be notified either with power-off
or sleep notification before turning off the Vcc. Failing to do so might
affect the device longevity. In mmc driver initialization phase even before
device probing gets completed, Vcc is getting turned off without these
notifications. Since it can't send commands at this stage, so just ensure
that Vcc is not turned off till initialization gets completed. See commit
eed1deac09ea ("mmc: sdhci-msm: Don't turnoff Vcc during initialization")
from msm-4.9 for more details.

However, above does not apply to the SD card and it may leave SD card's
power ON even there is no card present during bootup. Fix it by limiting
the above logic to non-removable devices only.

Change-Id: I9f1f13e7a7f233cf2a2aa945175d4e5c53bd489e
Signed-off-by: Can Guo <cang@codeaurora.org>
2020-09-04 14:38:43 +08:00
Jagadeesh Kona
5074ac0f45 clk: qcom: Add BIMC logging support during kernel panic
Add support to send BIMC logging request to AOP using QMP
Mailbox Client during kernel panic.

Change-Id: I21f3c67496064a5ff70a890cdaadfff5ab39b002
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
2020-09-04 11:26:46 +05:30
qctecmdr
4b9bef81d3 Merge "msm: kgsl: Capture gpu globals in hwsched snapshot" 2020-09-03 22:49:08 -07:00
Anirudh Ghayal
082b922a6e power: qpnp-qg: Do not round-up/down battery SOC in BASS
The rounding of battery SOC causes the monotonic SOC to
drop higher than expected (ratio of the drop of
monotonic to battery SOC is higher) leading to a bad
UX.

Change-Id: I7da1c3cff4fb9470a3904407f180463c26315e61
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2020-09-03 21:12:44 -07:00
Anirudh Ghayal
8a8da4d34d power: qpnp-qg: Battery-temp based ESR enable
Add a logic to ignore ESR based on battery temperature.
This is useful for very-low temperature based charging where
ESR could be way off. The default threshold is set to 10degC
and configurable via  "qcom,esr-low-temp-threshold".

Change-Id: Ic5b918434c63f71c412f782564e7a7aa818da6f1
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2020-09-03 21:12:37 -07:00
Kavya Nunna
affa09cad3 power: qpnp-qg: Allow signed values for Rconn property
Currently, Rconn value is read as unsigned, but
now signed value can be added, typecast it before
assigning it to variable.

Change-Id: If87adf2da724b5bbdef081018c59d52530c97f7b
Signed-off-by: Kavya Nunna <knunna@codeaurora.org>
2020-09-03 21:12:29 -07:00
Anirudh Ghayal
fb5d9ede79 power: qpnp-qg: Add the SDAM flash-ocv offset
On PM2250 the PBS sequence expects the battery-OCV
to output the right flash-boost output voltage. Provide
the same in a SDAM offset.

Change-Id: I9d43375d96de5a199c6a87c55e5c1079549b23ee
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2020-09-03 21:08:27 -07:00
Ashish Chavan
746b23d00c power: battery: Add support to enable PPS to work in CV mode
Add support to enable PPS to work in CV mode by allowing ICL
to be split for PPS adapter where the maximum ILIM  for it is
been limited to min(qc4_icl_ua, pd_current_max).

Change-Id: Iac3b4a4964783eb7f60a93e2237058f687e3de09
Signed-off-by: Ashish Chavan <ashichav@codeaurora.org>
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2020-09-03 21:08:00 -07:00
Kiran Gunda
2dbb68e04e power: qpnp-smb5: Do not set BC1P2_START_ON_CC on DAM
Do not set BC1P2_START_ON_CC on detecting a DAM cable to
avoid a device brown-out.

Change-Id: I9192c6d2e89170585b98cbbaa8762aeffe66949e
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2020-09-03 21:07:45 -07:00
Anirudh Ghayal
fa7a9cba6e power: smb5-lib: Report the CURRENT_MAX as 1A in CC-mode
Userspace uses the CURRENT_MAX power-supply property to
determine the strength of the charger. In CC-mode of operation
the main-charger's ICL is configured low and hence the
CURRENT_MAX reported is lower attributing it as a weak-charger.
Fix this by reporting a fixed value of 1A during CC-mode.

Change-Id: Id8745b54c3909d01df69376a823396ea4c94eeb1
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2020-09-03 21:07:38 -07:00
Kavya Nunna
b1ab97d70d power: smb5-lib: Add support for microusb
Add support for typec class registration for
micro usb platform for switching USB composition from UI.

Change-Id: I13e87b4ab099dd5efa56b121da6be227c81f961d
Signed-off-by: Kavya Nunna <knunna@codeaurora.org>
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2020-09-03 21:07:31 -07:00
Linyu Yuan
566158ff62 usb: dwc3: gadget: improve several ipc log
add gadget speed to 'BUS RESET' log, then 'UDC RESET' can be removed,
add link speed to 'CONNECT DONE' log,
add link state to 'SUSPEND INT' log,
show ep0 state when pullup during non setup phase.

Change-Id: I12c4f69796b09f0dce90ea88513a9653e7641df9
Signed-off-by: Linyu Yuan <linyyuan@codeaurora.org>
2020-09-04 11:50:53 +08:00
qctecmdr
ceeea50cd7 Merge "backlight: qcom-spmi-wled: Add support for QCOM SPMI WLED driver" 2020-09-03 19:54:58 -07:00
qctecmdr
a443a3ed31 Merge "cnss2: Increase prealloc table to satisfy latest driver requirement" 2020-09-03 19:54:58 -07:00
qctecmdr
018aa3da63 Merge "cnss2: Add changes to handle MHI power up failure properly" 2020-09-03 19:54:57 -07:00
qctecmdr
4396f438b3 Merge "clk: qcom: gcc-lahaina: Keep gcc_ddrss_gpu_axi_clk always on" 2020-09-03 19:54:56 -07:00
qctecmdr
13bc62c871 Merge "usb: typec: ucsi: check partner changed flag during notification" 2020-09-03 19:54:56 -07:00
qctecmdr
6ce9988563 Merge "defconfig: lahaina: Fix INTERCONNECT_TEST being disabled for QGKI" 2020-09-03 19:54:56 -07:00
qctecmdr
e929ec2669 Merge "soc: qcom: watchdog: Add MODULE_LICENSE and MODULE_DESCRIPTION" 2020-09-03 19:54:55 -07:00
qctecmdr
7751c1edbd Merge "msm: kgsl: Dispatch submissions using hwscheduling" 2020-09-03 19:54:55 -07:00
Hemant Kumar
1a11731616 pci: msm: Read clkreq override bit irrespective of rpmsg_send status
There is a possibility of race where drv enable flag is cleared and
DRV entered into L1SS sleep and went into SSR. This would cause the
clkreq override check to get skipped which would skip the L1SS exit
sequence and cause the link down when link is requested to perform
gen switch. Fix the issue by always reading the clkreq override bit
upon DRV resume.

Change-Id: I0f992875c8f54cba6b79c1484e55c441d0f08fb4
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2020-09-03 19:12:26 -07:00
Yue Ma
b52276d231 cnss2: Add runtime PM stats support
Add support to track runtime PM usage within platform driver.
Also add debugfs interface to query the same.

Change-Id: I0ee1d1eeed8c0c37bda65a5899b1a6ee2be625a1
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2020-09-03 18:17:00 -07:00
Bao D. Nguyen
459180cc35 mmc: sdhci-msm: Add SD card's err_stat sysfs entry
Add sysfs entry to query SD card errors statistics.
This feature is useful for debug and testing.

Change-Id: I15f2599683cbb811ad16796dc43fb34de019506c
Signed-off-by: Bao D. Nguyen <nguyenb@codeaurora.org>
2020-09-03 17:41:22 -07:00
Tony Truong
0e07873c1f Revert "msm: pcie: add support to manage PCIe PHY PLL block"
This reverts commit 3d5f6ea3f4.

Managing PCIe PHY PLL is no longer required since L1ss sleep has
been disabled on chipsets which needed this support. Therefore
remove all the dead code.

Change-Id: Icb1a8f93edc266cfcb8bf8259808abcbeb4dc2ee
Signed-off-by: Tony Truong <truong@codeaurora.org>
2020-09-03 15:34:31 -07:00
Yue Ma
47b53726d8 cnss2: Set CNSS PM ops to PM domain
Directly register CNSS PM ops to PM domain so that runtime PM
core will avoid calling PCIe framework runtime PM callbacks. This
is able to help CNSS driver sync runtime PM suspend/resume with
any other PCIe bus suspend/resume requests.

Change-Id: Ib71f0bf8eb8f28d1a4334d59505a24470a19a816
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2020-09-03 15:28:30 -07:00
Raghavendra Rao Ananta
260bc57301 ANDROID: ABI: Update allowed list for QCOM
Leaf changes summary: 1 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 Added function:

  [A] 'function void kernel_restart(char*)'

Bug: 167655719
Change-Id: I77ebb52869d4ea3b75d41c8a6c7ba47f3291bedb
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-09-03 22:30:48 +02:00
Yue Ma
447a2a819f cnss2: Increase prealloc table to satisfy latest driver requirement
WLAN host driver has new memory requirement in order to be loaded and
brought up interface. Increase prealloc table accordingly.

Change-Id: I44a394dd2c9e9636ec226ccb45fbf8ac6f30ddf3
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2020-09-03 12:29:36 -07:00
Gaurav Kashyap
83174e305d qtee_shmbridge: register bridges for CMA heaps
register shared memory bridges for CMA heaps

Change-Id: I4b80e215ea013894af27385dccec884d63d76dca
Signed-off-by: Jade Xu <qxu@codeaurora.org>
Signed-off-by: Gaurav Kashyap <gaurkash@codeaurora.org>
2020-09-03 11:22:22 -07:00
Gaurav Kashyap
7c9770b5c7 smcinvoke: add support of secure memory objects
SMCInvoke provides communication trusted clients and applications.
However, to send large buffers, it s reccommended to use memory objects.
If memory objects are coming from heaps which have not been registered
with SHMBridge, invoke operation would fail. Adding support to register
bridges for memory objects if those are coming from secure heaps.

Change-Id: Id13822f877b2ffb1886411705ffcbf1e3ef2a98a
Signed-off-by: Gaurav Kashyap <gaurkash@codeaurora.org>
2020-09-03 11:21:40 -07:00
Taniya Das
a03c45d40e clk: qcom: smd-rpm: Add support for clock handoff
During boot-up if the clock driver put across a initial high vote then
there is no way to remove these votes which can cause the corresponding
votes to be left always high till the CPU suspends causing power
regression. Thus introduce a device property which can remove the
initial votes from the clock driver and leave it up to the client to
keep a vote.

Change-Id: I068c87d06df908ee0ed0e58f69d46933b301ea6f
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2020-09-03 23:39:30 +05:30
Taniya Das
3003ceb2bf clk: qcom: clk-smd-rpm: Remove support for LN_BB_CLK3 for Holi
As the LN_BB_CLK3 clock is no longer required to be controlled from the
clock driver, thus remove support for the same.

Change-Id: Iffa05a87e9f2e2d3a92377fbd60a1ebf32c935e2
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2020-09-03 23:38:27 +05:30