L23_READY bit in the PARF_PM_CTRL register is set coming
out of PBL. Clear it once PCIe enumerates. This will avoid
the corner case where L23_READY is sent to the host causing
the link to be disable before the EP PCIe driver has had a
chance to disable the endpoint cleanly.
Change-Id: I2159cf88c4ec5f2b38b7134e42c6a069a9738d6c
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
After BCR reset while reconfiguring the SDHC registers
Interrupt Signal Enable Register does not reflect the value
and so it fails initialization of eMMC. As per design constraint
it requires 200us delay after BCR reset.
Change-Id: I99eca34e02a1b2557dca3b3da5a0cbeb32b7aff5
Signed-off-by: Maramaina Naresh <mnaresh@codeaurora.org>
This change updates gpio to pdc mapping for sdxlemur.
Change-Id: I0149b3cc798815693a7999335444419b1d896444
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
Avoid calling ASSERT from select_window API when it called
from panic handler. As device is already crashed, calling
ASSERT will just add unwanted prints and dump stacks.
Change-Id: If38be6d8e452c49cabfa059b4bf12b2f8a3c60a2
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
The ep_disable functions uses pm_runtime_get_sync &
pm_runtime_put_sync_autosuspend to manage the dev & sysdev,
however doing auto suspend in sync context might lead to
errors on runtime framework due to the ASYNC flag not set.
When this happens, the runtime framework triggers
__might_sleep which in turn leads to a kernel panic.
Fix this by performing pm_runtime_put_autosuspend instead
of doing sync. This will set the ASYNC flag and will not go
for might_sleep check.
Change-Id: I9cff7738def5fac94d11e7648efc3602b9fe3ea6
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
Add support for reading ADC channels on a PMIC7 ADC directly from
the ADC_PBS peripheral on that PMIC instead of through PMK8350
ADC peripheral using PBS, for targets where PMK8350 does not run in
master mode.
The conversion request sequence for using ADC_PBS is similar to
the existing one for ADC7, with some differences in register
writes. In addition, SW now performs calibration in place of PBS,
for every conversion, by reading the three calibration channels,
calculating the reference values and entering them in the
calibration registers.
Change-Id: I9e47ed69e75ee2580a37195ea9063f24ffb8aac5
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
Charger detection can be iio based or psy based or ADSP based. In case
of psy based charger detection POWER_SUPPLY_USB_TYPE_CDP enum is
returned, while in case of iio based charger detection
POWER_SUPPLY_TYPE_USB_CDP enum is returned for cdp detection. Current
case is handling only psy based charger detection i.e driving a pulse
on DP for cdp detection is happening only for psy based charger
detection ensuring proper CDP detection, while failure is seen in
case of iio based cdp charger detection. Hence add support to check
appropriate enum for iio based charger detection as well. To add more
info for ADSP based charger detection driving of dp pulse will be
taken care by adsp.
Change-Id: I991a44efb77542b21fbfce14ab98ffad3f102edb
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
Currently driver is seting UART error code to default only when
BT host calling TIOCFAULT crash ioctl.
This change is to reset UART error code to default during shutdown
so that it will helps in passing correct UART error code from UART driver
from next session.
Change-Id: I2a073634699d54e905ca3970392563f7d8130640
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
Update is_clock_off and wakeup_enabled variable to atomic
to avoid race conditions while accessing it.
Change-Id: I7e792b5938befeeede60f15353be328d20c25758
Signed-off-by: Anvesh Salveru <asalveru@codeaurora.org>
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
The critical devices or critical clocks where the clocks of the device
node requires to be kept enabled should be checked for valid rclk before
update. Thus check for NULL before accessing the rclk.
Change-Id: Ie0cf1486f8cc422de8fce0241bd6e81fd9d7ca2b
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Change is to update the de-emphasis value of NTN3
via i2c register writes to resolve link failure
issues seen on MBB platforms.
Change-Id: If90e5efc19691a14c3d5f12af78df9ff5c2b2a25
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Kaustubh reported and diagnosed a panic in udp_lib_lookup().
The root cause is udp_abort() racing with close(). Both
racing functions acquire the socket lock, but udp{v6}_destroy_sock()
release it before performing destructive actions.
We can't easily extend the socket lock scope to avoid the race,
instead use the SOCK_DEAD flag to prevent udp_abort from doing
any action when the critical race happens.
Change-Id: I8ec3f73ed5f8324722b29450c37b4ae23a81c0f3
Diagnosed-and-tested-by: Kaustubh Pandey <kapandey@codeaurora.org>
Fixes: 5d77dca828 ("net: diag: support SOCK_DESTROY for UDP sockets")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-Commit: a8b897c7bcd47f4147d066e22cc01d1026d7640e
Git-repo: https://kernel.googlesource.com/pub/scm/linux/kernel/git/netdev/net.git
Signed-off-by: Kaustubh Pandey <kapandey@codeaurora.org>
IPA Offload Sub-System v1 is deprecated now that all ethernet drivers
have moved to v2.
This reverts commit 6d40652ad7.
Change-Id: Ie56390eda564627cd9f9ccdb64123c656b5d96b6
Signed-off-by: Jinesh K. Jayakumar <jineshk@codeaurora.org>
Packets from gsb are cloned packets, which has been done
to optimize the dl data path. The check for cloned skb
calls pskb_expand_head which gives penalty in the throughput.
GSB driver data path does not consume the skb so, reallocation
of skb is not necessary here. For that reason the check for
all packets from gsb is introduced here. This check improves
the throughput to about 150 Mbps.
Change-Id: Ic1d7cc9c94605f1902ba212aac52d535d0ff84a7
Acked-by: Rishav LNU <rna@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
On detection of SMMU fault, platform driver send
SMMU_FAULT and FW_DOWN event to Host driver.
Change-Id: I623522231b5ee7ab0b03b8c1b25993395b7f3a2d
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
This chage adds retry mechanism to smcinvoke driver
in case when secure side is busy. Driver will wait for
30 milliseconds before retrying the scm call. This
change also makes smcinvoke driver at par with qseecom
in terms of trying for around 2 seconds before sending
EBUSY error back to client.
Change-Id: Ie9523bc81f3aa03497836f06180c9d3f8a8efc99
Signed-off-by: Anmolpreet Kaur <anmolpre@codeaurora.org>
find_last_bit() relies on unsigned long pointer arguments. Driver
uses a type cast that generates the KASAN warning. Replace
find_last_bit() with __fls() to pass the value and avoid casting
pointer to make the warning go away.
Change-Id: I247e5c425ba0c44d04b518bd6d4f351f9c700b29
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Currently driver only support generic serial interface.
Adding communication device class specific descriptors
and notification endpoint support required for the
enumeration of a DUN interface. Add control transfer
APIs to send and receive serial line state.
Change-Id: I8d50495ad51797dfc8b3e77464474d9fe70d8636
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Support QDSS_STM and vote for apb_pclk when QCOM_KGSL_QDSS_STM
config is enabled.
Change-Id: Ibe70585044e369ff9af2854b8fb5c10d860c40e7
Signed-off-by: Harshitha Sai Neelati <hsaineel@codeaurora.org>
Define recovery_finish crypto vops to support
MMC CQE recovery handler path.
Test: Initiate CQE recovery, which calls into crypto
specific recovery method. If the crypto vops are
registered on the device, this flow does not lead to
a null pointer dereference with this fix included.
Change-Id: I6dfaf52a303b9ffa71b6b65779f8e657d6ca051a
Signed-off-by: Vaibhav Agrawal <vagrawa@codeaurora.org>
The incorrect first cycle vibration issue is applicable only
for PM8350B PMIC. Hence, make the SW W/A to toggle the CAL_EN mode
from disabled to auto mode specific for PM8350B PMIC. Introduce
a "wa_flags" variable to handle the SW W/A in a cleaner way.
Change-Id: I8f0c31fd21681274081a4d58d589b4ed9a188f34
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
Parse JEITA and step charging settings from battery
profile and send them to userspace algorithm for
TTF calculation.
Change-Id: I6250b34ecdca0d94d672f5859843cc4c54923412
Signed-off-by: Hui Liu <huliu@codeaurora.org>
When we call crypto_qti_program_key to program the key, and
it fails due to trustzone busy issue, we try to call invalidate
key method just after that, and in the process, overwrite the
error code returned by the program key failure. Fix this by handling
the errors from both program key and invalidate key separately,
and return the program key error code to caller.
Test: Verified device boot up and reboot.
Change-Id: Iaff0844f68b4886c23e1840d7e0e4a404d38fc96
Signed-off-by: Vaibhav Agrawal <vagrawa@codeaurora.org>