In linux guest restart case, during probe, stop_rx_sequencer is
getting called because of residual state set before restart.
spin_lock which is used in stop_rx_sequencer is not initialized.
To, resolve spin_lock debug mentioned below, initialize spin_lock
early.
spin_dump+0x84/0x88
do_raw_spin_lock+0xd4/0x12c
raw_spin_lock+0x20/0x2c
handle_rx_dma_xfer+0x44/0x330
stop_rx_sequencer+0x118/0x420
start_rx_sequencer+0xc0/0x1a0
msm_geni_serial_runtime_resume+0x54/0xb8
pm_generic_runtime_resume+0x44/0x80
__rpm_callback+0x98/0x208
rpm_resume+0x458/0x6a4
__pm_runtime_resume+0x60/0xa0
__device_attach.llvm.18035772682363603059+0xa0/0x174
bus_probe_device+0x3c/0xdc
device_add+0x95c/0xb84
serdev_controller_add_platform+0x2c/0x1d0
serdev_tty_port_register+0xf8/0x188
tty_port_register_device_attr_serdev+0x50/0x90
uart_add_one_port+0x268/0x60c
msm_geni_serial_probe+0x630/0x780
platform_drv_probe+0xac/0xf0
really_probe+0x210/0x7d8.
Change-Id: I9e139897681ece174a9ead63f57bb999585ff0bf
Signed-off-by: Venkata Rao Kakani <vkakani@codeaurora.org>
Kernel symbol size is very small after removed CONFIG_DEBUG_INFO, so
add it back. This change adds below kernel configs for SDX12 debug
build:
CONFIG_SLUB_DEBUG
CONFIG_DEBUG_PREEMPT
CONFIG_SCHED_DEBUG
CONFIG_HAVE_DEBUG_KMEMLEAK
CONFIG_DEBUG_BUGVERBOSE
CONFIG_CC_HAS_KASAN_GENERIC
Change-Id: I502dd3800252077838063a0a4c25fe92bdac4c48
Signed-off-by: Wu Gao <wugao@codeaurora.org>
Add support for USB BCRs for USB clients to be
able to apply reset.
Change-Id: If98d96ec6b30b0d9d4d3360ce412840cac166915
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
In some scenarios, during force firmware assert handler, the
pci link is going bad once the registers dumps are started.
Add code to do pci link recovery check after register dumps\
collection.
Change-Id: I7388e9bea1ffc789d6c4df4870233bf594e2d488
Signed-off-by: Mohammed Siddiq <msiddiq@codeaurora.org>
Add clock IDs for GCC/GPUCC/DISPCC for clients to be able
to request for clocks from these clock controllers.
Change-Id: Ibd69e800ff6ebd0d59d34605deb8dc092c25b907
Signed-off-by: Hongwei Ren <hongren@codeaurora.org>
Add flags to see interrupts during suspend process.
Change-Id: Id6e42f1bb7287ab8a62db6d6a248f8c6d418df3f
Signed-off-by: Vinay Sudra <vsudra@codeaurora.org>
Correct the offsets of L1SUB_CAPABILITY_REG and L1SUB_CONTROL1_REG.
Change-Id: I6130a7eab50d85e34d87c28bde3a48c058ee9eee
Signed-off-by: Can Guo <cang@codeaurora.org>
Allow device enter L1, i.e. clear PCIE_0_PCIE_PARF_PM_CTRL[REQ_NOT_ENTR_L1]
once we find out BME is set.
Change-Id: I8aca816446a286d02ef51724d157cb7c75057250
Signed-off-by: Can Guo <cang@codeaurora.org>
For a640/a680, we need to actually disable CX GDSC instead of
just return a enable state, the GMU oob set will timeout while
doing gmu idle check, therefor to really turn off CX GDSC
requires to set regulator mode first, and there are several
places to disable cx gdsc, move the set mode to
a6xx_cx_regulator_disable_wait.
Change-Id: Idb7d1b75f17426cc5cb6bb8054b2c2c4400f3db2
Signed-off-by: Hui Li <hul@codeaurora.org>
Currently, the driver is relying on remove_requests or
ep_dequeue to giveback the requests to function driver,
but when the stop active transfer is called it will
return with error status and will bail out from remove
request without clearing the requests. At this point
we rely on ep_dequeue to clear those requests, but since
usb is disconnected, it will be in LPM which would
drive dequeue to bailout without clearing the requests.
Fix this by removing the LPM check from dequeue to
stop_active_transfer. Now if dequeue process proceeds
will check in stop_active_transfer, if dwc3 is in lpm
bail out from the process. Dequeue will further proceed
& clean up the request from cancelled list.
Change-Id: I13628ab96059fbae14bed64056ff8d7561cd240f
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
Sometimes IB1_BASE from register does not match with IB1 of the
ring buffer, this may happen while doing save restore of IB
during preemption. In such case, to dump IB1 in snapshot, check
for overlap between IB1_BASE and IB1 from the ring buffer and
dump IB1 in snapshot as per ring buffer's IB1 base and size.
Change-Id: Ic3af8678a11f20f447fcbcbd3ec209283619b96a
Signed-off-by: Pankaj Gupta <gpankaj@codeaurora.org>
DDR residency can be read using sysfs node.
This change provides an API to get ddr residency so that it
can be read from any kernel drivers.
Change-Id: I6f0d508994a1f5e427e2cbce6f0229013fec387f
Signed-off-by: Minghao Zhang <minghao@codeaurora.org>
domain number could be different between platforms.
Change-Id: I6fa33635305ec71ec2ebaec35f7a68bbe0181609
Signed-off-by: Minghao Xue <mingxue@codeaurora.org>
This change optimizes to get reg during probe.
With this change no need to ioremap_nocache() reg for every
ddr_stats_show() call.
Change-Id: Ieb38280d1f03e1d613e638a7532b7b014525fbf1
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
Signed-off-by: Minghao Zhang <minghao@codeaurora.org>
Enable the ARM SMMU driver as a module for direwolf GKI
and also enable other IOMMU configs for direwolf QGKI.
Change-Id: I3b27eda0efbf64411de22a36a430121356bb79bd
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
Signed-off-by: Veera Vegivada <vvegivad@codeaurora.org>
Enable IPCC driver as a loadable kernel module for direwolf.
Change-Id: I03bdc05193b9892e99a02c9855dcfe3e6a20a69e
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
Signed-off-by: Shreyas K K <shrekk@codeaurora.org>
Some USB host PCs switch the downstream port mode from
CDP to SDP if the device does not pull DP up within certain
duration (~2s).
This limits the current drawn by the device to 500mA(or 900mA)
as opposed to the possible 1.5A resulting in slow charging of
the battery.
Fix this by driving a DP pulse when there is a connect
notification from PMIC and detected the charger type as CDP.
Change-Id: I76ac4c33dbbc538f5cb680fd1b5c15f8fb3bfe50
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
Get rid of access to pciedev_table. Update data type
for bdf from unsigned long to u32. Prevent iATU config
for root port BDF. Do not save config values to rc_shadow
as iATU is configured dynamically.
Change-Id: I9e7254d1e6d91869db71c71f1c5b699a4d6376f4
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
For endpoint event registration do not depend on
num_ep, active_num_ep and pending_ep_reg variables.
Instead, create a list of registered endpoints and
notify an endpoint by iterating over the list of
registered endpoints with their corresponding
registered event. This also removes dependency on
PCIe device table and simplifies
msm_pcie_config_device_table function. Keep the
handling of upstream port I/O, memory and BME.
Change-Id: I5ab25ef300f0bc59ae5c2d973c662a0f81e44f43
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Decouple endpoint event registration from link suspend.
Instead of relying on pending_ep_reg and num_active_ep
create an enumerated endpoint list at the time of endpoint
enumeration and move it to suspended endpoint list up
on link suspend. If enumerated endpoint list becomes
empty allow link suspend. Move endpoint back to enumerated
list upon resume. This also removes a race where all
endpoints have not completed their enumeration and one of
the endpoints request to suspend the link.
Change-Id: I22ac6e52a4c93d294d2a365da63cc7292e5e36ce
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Instead of using global array of msm_pcie_dev use
existing PCIe device pointer in the function. Also
fix the indentation of the debug log strings.
Change-Id: I82eaaf2bfcbd4f588d1970131e0185f51d0f8ea5
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
It possible that EP gets PCI probe and tries to access EP config
space before driver could finish setting up PCIe device table.
Due to this race before driver could populate the config base
address in table, operation config call back from framework
tries to de-reference config base address which is NULL. Fix
this issue by dynamically configuring iATU with config space
address range mapping to the BDF for which config space is
requested for. This prevents access to pcie device table which
is used for static mapping for multiple device config space to
its BDF.
Change-Id: Ie6a83355087912369e46f028d8ffe5e4b5a5fba5
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
AER handler is directly using raw read and write APIs to access
endpoint config space. Instead, use PCI framework provided APIs
as well as the register macros to stream line all config space
reads and writes to go through PCI read and write operation.
Also, use PCI framework APIs to find the pci device using BDF
this removes the dependency on local pci device table.
Change-Id: I5b0fa2dc6eb383d9db2dc42f026a2b6cb85b3d71
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
AER handling requires finding the source pci device on
the bus which causes the AER. Source pci device is found
using bus, device and function number. Finding pci device
requires sleeping context because bus is walked by holding
semaphore. Hence move AER handling to threaded irq context.
Change-Id: Ia51b91560326be2a85e17ce98315ea39d25641e2
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
In haptics pattern/fifo/brake debugfs file write operation functions,
strsep() is used iteratively to split the user-passed string into tokens
for setting parameters. However, strsep() modifies the pointer passed
and hence the same pointer cannot be used in kfree(). Fix this by
copying the pointer originally allocated by kzalloc() and use it in
kfree() as well.
Change-Id: I2baf8db4f7c39e7ab0a83411717e46a29a2e849b
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
The firmware size returned by request_firmware api is size_t which is
unsigned long in some platforms. Typeacast the size to u32 to match with
supported interface definition.
Change-Id: I61a484e74bf7932508295aac2fe7cfd7298d7953
Signed-off-by: Mahesh Kumar Kalikot Veetil <mkalikot@codeaurora.org>
Commit 3ef97296e7 ("usb: dwc3: gadget: Handle race between
remove_request & ep_dequeue") was introduced to fix the race
between remove_requests & dequeue process,but it exposes a new
issue where we see crash on ep_set_halt where the started list
gets corrupted since composite cleanup already did a free_req.
Fix this by reverting the older patch and handling the race
of remove_requests & dequeue in cleanup_cancelled_request
by iterating over the list using while loop which will insure
to access the first node from list_head.
Change-Id: I727ca54e5ac839ceb55efb644a7cd8d514db63b6
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
If console is disabled with below kernel cmdline arguments
"console=null earlycon=null androidboot.console=null" cons->name
will be set to null and cons->index pointer will not updated for
console. Hence uart_console(uport) check will fail, poxy vote
added by common driver probe on behalf of earlycon won't be
removed. This will not allow device to enter to enter sleep.
Fix this by replacing uart_console(uport)check with dev_port->console
check in probe so that it will remove vote during real console probe
after uart_add_one_port.
Change-Id: If41f588c10546abef247b55d3cd3a1f3e80cafe4
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
Enable STM_PROTO_BASIC to support to write log to /dev/coresight-stm
Change-Id: I37dc42a5ba1c9a2b973ca5150b66c1354c047a86
Signed-off-by: Huixian Ma <huixma@codeaurora.org>
Add support for Camera, Display, GPU and Video
AHB clocks.
Change-Id: I1c60f2f720b57659ab92e770448c1ce1c27a359e
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>