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>
New feature bit for MFHDR is added in binding file.
CRs-Fixed: 2770220
Change-Id: Ic0a0059df707dd51efce04b1892803ab8cbae0de
Signed-off-by: Vikram Sharma <vikramsa@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Register irq stacks, so that irq context is correctly
captured in minidumps.
Change-Id: Iabafe0464961a0c25164d66a186846290fbfcafb
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>