Enable boot stats driver and boot time marker config
options for gen3auto targets.
Change-Id: If9b24937d2fe1df9f8a3eb5f0e8ee1d0b4c4d28f
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
Touch uses gpio as irq in LA. As per latest change from pinctrl,
wakeup bit is disabled/enabled when disable_irq/enable_irq is called.
During transtion from LA to LE, disable_irq is called leading to
wakeup bit getting disabled and in LE Touch interrupts does not come.
So, use disable_irq_wake to disable Touch interrupts while transition
from LA to LE and use enable_irq_wake to enable back Touch interrupts
while transition from LE to LA.
Change-Id: Iad3391af40535d51daeef881c3d62b3ec893fff2
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
Currently we are accessing snapshot structure after signaling
dump_gate. In corner cases this worker can get preempted
before driver reads this variable, and eventually client
dumps the snapshot and snapshot object gets released.
When worker gets back in execution it will read freed memory
and will case kernel panic.
To fix this race, do completion for dump_gate after finishing
work in worker kgsl_snapshot_save_frozen_objs.
Change-Id: Iaf3c9f9e75a6e3e19653d2d166e2da624796ec98
Signed-off-by: Pankaj Gupta <gpankaj@codeaurora.org>
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
Currently certain platforms have cores which are only host-mode
compatible. Prevent switch to peripharal mode for such cores so
as to prevent unanticipated core behavior and crashes.
Change-Id: I163e878bfe7428ed339409adb8a491a6673ca055
Signed-off-by: Harsh Agarwal <harshq@codeaurora.org>
Add support for new versions for BT chip
CRs-Fixed: 2880672
Change-Id: Ia86bdec665a56d67cd53c0531ab7aebb14b4bcc0
Signed-off-by: Satish Kodishala <skodisha@codeaurora.org>
Update init_bootkpi and boot_marker_enabled as inline
functions to avoid -Wunused-function compiler error.
Change-Id: I61098c8bcc941d21a2ff30905cd93d82af1cf1f4
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
The current implementation of handling run/~stop of DCTL based
on state of VBUS or the pullup call from the udc core can
result in a below race condition where the run/~stop is cleared
twice leading to an invalid state of controller.
Thread -1 Thread-2
vbus_session (1)
spin_lock
no run_stop(1) call pullup(1)
spin_unlock softconnect = 1
vbus_active checked
vbus_session (0)
spin_lock
run_stop(0) called
spin_unlock
Prevent this by ensuring a proper state transitions and clear
run/~stop only when when there is a transition from ACTIVE
and there is an pullup(0) event or vbus_session(0) call.
Change-Id: I03c4acfc2c6697e02c510d079c7d48d9a82bb322
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
Enable building of adsprpc driver along with
kernel image.
Change-Id: I34dd3098db1973d0a8e4e9a7bcb4dae507901de5
Signed-off-by: Jeya R <jeyr@codeaurora.org>
Set CONFIG_BLK_DEV_LOOP_MIN_COUNT=16 that pre-create loop block
devices at init time for vts_kernel_loopconfig_test.
Change-Id: I136c0f620913d2ce8ddbb0ccbd8bc0b05f72a3ad
Signed-off-by: Vinay Sudra <vsudra@codeaurora.org>
Commit 6a247993218c ("usb: dwc3: gadget: Properly handle failed
kick_transfer") introduces a piece of code where if gadget_ep_cmd
fails in kick_transfer, it calls stop_active_transfer for that ep
& move the request from started_list to cancelled_list. Finally
it checks for DWC3_EP_END_TRANSFER_PENDING flag, if not set then
moves ahead and calls dwc3_gadget_cleanup_cancelled_request as part
of which gadget giveback for the request is called. This will
ultimately mean ep_queue failure as ep_queue returns the status of
kick_transfer.
Now from the function driver perspective, when ep_queue fails
it tries to add the request back to the pool from which the request
was queued.
But,since we did a cleanup_cancelled_request the completion handler
of the function driver is also called which tries to add the same
request back to the pool, resulting in a double add scenario.
Fix this by returning 0 from ep_queue rather then returning the
status of kick_transfer. For a function driver it would mean
ep_queue success and will not add the request back to read pool
and since we already are giving back the request as part of
cleanup_cancelled_requests, the request will be added back to
the pool and avoid the double add scenario.
Change-Id: I82bc21c34a795820998483c4a88e1891495a6906
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
Consider a case where ffs_func_eps_disable is called from
ffs_func_disable as part of composition switch and at the
same time ffs_epfile_release get called from userspace.
ffs_epfile_release will free up the read buffer and call
ffs_data_closed which in turn destroys ffs->epfiles and
mark it as NULL. While this was happening the driver has
already initialized the local epfile in ffs_func_eps_disable
which is now freed and waiting to acquire the spinlock. Once
spinlock is acquired the driver proceeds with the stale value
of epfile and tries to free the already freed read buffer
casuing use-after-free.
Fix this race by assigning epfile under spin_lock from
ffs_func_eps_disable.
Change-Id: I9e1f376bb2212e8a8040f884514342c428098bdd
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
All transactions originating from IPA have the Relaxed Ordering
bit set by default. Setup an ATU region to clear the bit for
MSIs triggered via IPA DMA as MSI writes shouldn't have it set.
Change-Id: Ib092834ca2d1a3e01aa3e63e1b35f7ab6766d9a0
Signed-off-by: Siva Kumar Akkireddi <sivaa@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
ep_pcie_core_wakeup_host() checks for l23_ready, this results in
WAKE pin getting asserted while PERST is already de-asserted.
Becausee enable_end_point already completed, WAKE is never toggled
back to the original state and remains asserted.
Removing the check for l23_ready and thus preventing WAKE
assert when PERST is in de-asserted state.
Change-Id: I1389ad0f24af7d0d1877563327190737f9872611
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
During customer testing, when host is in BIOS stage during critical
battery level device boots up till AMSS. We get a BME IRQ fired, but
BME is no set as host has bailed out enumeration process due to
critical battery level. This is followed by a PERST assert, in
disable_endpoint we bail out as the PERST is in de-asserted state
according to the status variable, though the actual line status
is assert. The host then continuosly tries to do PERST
assert/de-assert but we never end up doing link training as from
device perspective the link is already initialized state.
Adding change to update PERST status in case of BME not getting set.
This helps in disable_endpoint to happen followed by successful link
training.
Change-Id: Idd576f4cb0ab649b5aa86e6b1d2cdea204218878
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
Changes to acquire wakelock as part of PERST deassert
in non enumerated scenario.
Change-Id: Ica992e12fe827e29416fbe56469d7be8b92ff5c5
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
During bootup scenario, there will not be any PERST de-assert
interrupt. So if host send mhi suspend event followed by
D3 hot and D0 event, then the PCIE link will be in an enabled
state but there will not be any wake lock to prevent system
suspend scenario.
To prevent the above scenario we will acquire wakelock as part of D0
during bootup scenario and from PERST-deassert for subsequent cases.
The change also involves to prevent system suspend if there is PERST
de-assertion during system suspend scenario.
Registering for suspend_noirq(), as this guarantees that there can be
no wakeup interrupts(PERST assertion) during this call.
Change-Id: I19051df46cc8353492e34175a47665ab89dc86af
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
Add mechanism to detect and enable pmuv3 on 32 bit kernel.
Change-Id: I56e0c5a0bb2dbc2dc1445fb578782ec5e8c98def
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
Signed-off-by: Biao Long <blong@codeaurora.org>
Provide users a way to check how many times the link between
root complex and its partner have entered L0s, L1, L1.1, and
L1.2.
Change-Id: If3170d26221d05039afc0a2433bebaf0c3799549
Signed-off-by: Tony Truong <truong@codeaurora.org>