Master and slave transactions were not clearing the previous
command errors correctly. We have to set only the error bits
to 1 in order to clear BANKN_ESR.
Change-Id: Ia7968577d27b6d53476b78f9083bed9ca233f108
Signed-off-by: Gaurav Kashyap <gaurkash@codeaurora.org>
Ensure that the PMIC temperature reported is at least the lowest
value possible for the current over-temperature stage.
This guarantees that we cannot hit the following corner case on
PMICs that have a GEN2 TEMP_ALARM peripheral:
0. The PMIC's thermal zone device tree configuration defines a
passive trip point equal to the stage 1 over-temperature
threshold (e.g. 95 C) and hysteresis=0, along with
polling-delay=0 and polling-delay-passive>0.
1. The PMIC heats up and reaches 95 C at which point the over-
temperature stage transitions from 0 to 1.
2. The PMIC triggers the TEMP_ALARM IRQ (which only occurs for
over-temperature stage 0 -> 1 and 1 -> 0 transitions on GEN2
peripherals).
3. The qcom-spmi-temp-alarm IRQ handler signals to the thermal
framework that an event has occurred.
4. The thermal framework reads the PMIC temperature (via ADC).
5. If the temperature reported by the ADC is less than 95 C
(e.g. 94.99 C), then no further action is taken.
6. The PMIC temperature can continue to increase without software
awareness.
7. Eventually the PMIC temperature can hit the stage 3 over-
temperature level (e.g. 145 C) at which point the PMIC abruptly
shuts down the system.
This situation is avoided if at step #5, the qcom-spmi-temp-alarm
driver instead reports a temperature of 95 C (which is the minimum
possible for over-temperature stage 1) instead of the slightly low
ADC temperature reading. Doing so causes the thermal framework to
switch to passive polling of the PMIC temperature. This ensures
that further increase of the PMIC temperature is directly observed
by software. That way, an orderly shutdown can be initiated by
software if needed before hitting over-temperature stage 3.
Change-Id: Ia4d12f092fb06970d686b830051788430afd32dc
Signed-off-by: David Collins <collinsd@codeaurora.org>
Allow I/O coherency to be enabled on imported buffers if I/O coherency
is enabled and we can determine the cache characteristics of the
imported buffer. The caller should check the flags after allocation
to determine if I/O coherency was enabled.
Change-Id: Ic0dedbade77189bd51dddad64d15f0835601e925
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
In order to make devlink happy we need to bind an IOMMU device on the
primary GMU platform device. Since we don't need GMU user yet the
decision is easy. Move GMU kernel to the platform device instead
of a child.
Change-Id: Ic0dedbad082c57b2aeb6a35573ead8535f3b8ab9
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Accessing DTCM when SMMU is stalled can lead to NoC timeouts.
Also, skip sending NMI to GMU because GMU will not be able
to save cm3 state to DDR if SMMU is stalled.
Change-Id: I56a5399ca4847c6463862141f362e01fb86d3669
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
Remove the redundant check for static PDR handle as the PD up flag
serves the same purpose.
Change-Id: I6c9d925fec745bf84bd26468bf39c8e6e78b858d
Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com>
Signed-off-by: Himateja Reddy <hmreddy@codeaurora.org>
Fix out of bounds write during device tree bus bandwidth array copy.
Change-Id: I5fa1be5beabdccc4d662c74018d8fa22c547697b
Signed-off-by: Manikandan Mohan <manikand@codeaurora.org>
Check the core isolation to get PM QoS request on that core while
it going to lpm. If its an isolated core pass long latency so
that core can select deeper lpm state.
Change-Id: Iafbfb75c484d602eb37bcd702e83371fd97362fd
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
Upon a panic, the cache flushes are handled by the software
layers that collect the ramdumps. Hence doing it from the
kernel is no longer necessary and can be removed.
Change-Id: I83860fb4361e42aea69f0f5cc75aaff5c3c4e3b0
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
Add support to read current channels on PM8350B and SMB139x
charge pumps.
IIN_FB - Input current drawn by main charger (PM8350B)
ICHG_FB - Charging current from main charger (PM8350B)
IIN_SMB - Input current drawn by one of SMB139x
ICHG_SMB - Charging current from one of SMB139x
Since, most of these channels needs prescale ratios post reading
ADC code and before scaling, add the necessary prescale ratios.
Change-Id: Id9b866f684d574813904a5fd8e658f59b1d7bcbf
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Add support to read CHG_TEMP channel on PM8350B to get charger
temperature.
Change-Id: I33c69e56d47b0ab37772df8d55eae2ab0c5bad86
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Add support to read SMB_TEMP channel on PM8350B that is output by
charge pump (smb139x). When this virtual channel is read for
one of SMB139x charger pumps, PBS does the configuration for that
SMB139x appropriately.
Change-Id: Ia9af1ef78571c56898057d567117fcd9b7d28172
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
When sudden reset by watchdog occurs, kernel log is very helpful.
But the log has saved structure type in log_buf.
So we want to collect the log on runtime to string format at other
reserved memory.
Bug: 167766040
Change-Id: Ic9686acc7c284e2ab81395fb9cc076fafe142bf9
Signed-off-by: Changki Kim <changki.kim@samsung.com>
While executing suspend_noirq callbacks non-wakeup interrupts are
disabled, wake-up interrupts are enabled but their handling is
deferred till the completion of suspend_noirq stage.
UART console vote/unvote the resources in suspend_noirq/resume_noirq
stages. There is no issue wrt managing clk and pinctrl resources at
noirq stage however ICC BW voting can't be done at noirq stage.
ICC requests are converted to ack based requested for RPM driver, the
ack here is nothing but interrupt from IPCC driver and it can't be
processed at noirq stage, hence flow is indefinitely stuck in UART
suspend_noirq callback.
Change-Id: Ie279580795d3c85db4dc42766b0b2d9a8adb3f00
Signed-off-by: Akash Asthana <akashast@codeaurora.org>
Sometimes due to late initialization glink callback may not be
initialized and incoming will be dropped.
Print error message if receive callback is not ready.
Change-Id: I3eae1717d4e1c14b319e288078d122762fd476e7
Signed-off-by: Sarannya S <sarannya@codeaurora.org>
Some of the fs allocations like those for journalling
are critical and can cause a fatal error if allocation
fails. Avoid bailing out early in those cases, even if
a fatal signal is pending on the caller task.
Change-Id: Ib2803d763313b196123a4c1e2c66227b5d6e6e14
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Receive callback can be registered even before rpmsg driver probe is
complete. Assuming callback register as channel ready and allowing
remote host to send data is incorrect. In such case for any rx packet
callback may return prematurely thereby dropping the rx packet.
Adding a flag to store channel state when it is ready. Check this flag
before allocating rx intent and allowing data communication to proceed.
It will ensure that client driver is able to receive data correctly,
without any rx packet getting dropped.
CRs-Fixed: 2747216
Change-Id: Ib153cfe5689f31d7417622bf6177e9535fda628a
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
Add checks to properly handle and fix possible NULL pointer
dereferences and avoid usage of uninitialized variables.
Change-Id: I30f1b13ee4988286fbd1856f823858dee81fe5a3
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
Added support for notifying hints from userspace
Change-Id: I3af1951614e4cd20826a595c6fca23b18c5a749b
Signed-off-by: richagar <richagar@codeaurora.org>
Add msm performance module function calls to send
kgsl queue, submit and retired events. These events
will be accessed by userspace through msm performance
module to apply dynamic performance boosts.
Change-Id: I6d93831e5fe821032b8e32c52e88b72ab102f6a2
Signed-off-by: Aman Mehta <amanmeht@codeaurora.org>