Commit Graph

1127917 Commits

Author SHA1 Message Date
Peng Yang
0d5668be22 generic_vm_defconfig: virtual io: Enable debug options
Debug options being enabled provide ftrace events necessary
to collect information about virtul io events.

Change-Id: I2e197f943862f9826c94940ccf617c4bbcfe2fc2
Signed-off-by: Peng Yang <quic_penyan@quicinc.com>
2022-10-16 18:34:19 -07:00
Srivatsa Vaddagiri
b928977576 gunyah: virtio: Add trace events
Add trace events to aid debugging.

Change-Id: I23d0c193ba8ba1823542c9f14edb37468a7b602a
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Signed-off-by: Ashish Bhimanpalliwar <quic_abhiman@quicinc.com>
Signed-off-by: Peng Yang <quic_penyan@quicinc.com>
2022-10-16 18:33:53 -07:00
qctecmdr
fac94f07d4 Merge "bus: mhi: devices: Fix number of arguments in API mhi_prepare_for_tranfer" 2022-10-15 21:06:26 -07:00
qctecmdr
4cab18afee Merge "bus: mhi: host: Enable and update IPC logging usage" 2022-10-15 21:06:25 -07:00
qctecmdr
6e308e1672 Merge "clk: qcom: clk-alpha-pll: Fix pll enable outout" 2022-10-14 13:36:41 -07:00
qctecmdr
5f267fb6b6 Merge "defconfig: pineapple-gki: Enable QCOM_SPSS and dependency" 2022-10-14 13:36:41 -07:00
qctecmdr
b87cea8461 Merge "slimbus: stream: add support to control port disconnect" 2022-10-14 13:36:41 -07:00
qctecmdr
e7af56b81b Merge "coresight: etm4x: Fetch device name in sysfs from device tree" 2022-10-14 13:36:40 -07:00
qctecmdr
748a67a29b Merge "soc: qcom: qcom_stats: Add API to get ddr freq information" 2022-10-14 13:36:39 -07:00
qctecmdr
fbff32ecf4 Merge "drivers: qcom: Add sys_pm_vx driver snapshot" 2022-10-14 13:36:38 -07:00
qctecmdr
915d25aab7 Merge "coresight: add support for device names" 2022-10-14 13:36:37 -07:00
qctecmdr
0a12785bd7 Merge "mem-buf: Exit mem_buf_lend_internal if the mem-buf not probed" 2022-10-14 13:36:37 -07:00
qctecmdr
6e89d3034b Merge "swiotlb: fix data abort on pineapple tuivm and oemvm" 2022-10-14 04:55:21 -07:00
qctecmdr
509c8ede30 Merge "bus: mhi: host: Move MHI_MAX_MTU to external header file" 2022-10-14 04:55:21 -07:00
qctecmdr
8680c038ee Merge "net: qrtr: ns: Add pr_fmt to ns" 2022-10-14 04:55:20 -07:00
qctecmdr
a097b57e48 Merge "build.config: kalama: Change Boot header version to 4" 2022-10-14 04:55:18 -07:00
Anvesh Salveru
ce345ff94d slimbus: stream: add support to control port disconnect
There is a requirement where slimbus slave don't expect ports
to be disconnected during stream unprepare for sample rates
other than 44.1/88.2k, which is causing mute issues.

Added new slim_stream_unprepare_disconnect_port API to support
disconnect port request from clients without freeing port memory
allocated during stream prepare.

Change-Id: Idb00a1fdf15d864cb6ee82f67c0db4777434b296
Signed-off-by: Anvesh Salveru <quic_asalveru@quicinc.com>
2022-10-12 20:47:39 -07:00
Chris Goldsworthy
f484c0e648 mem-buf: Exit mem_buf_lend_internal if the mem-buf not probed
Exit with an error from mem_buf_lend_internal() if the driver hasn't
probed.

Change-Id: Ide42166c2f850197f989a228f9139d401411a914
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2022-10-11 20:31:32 -07:00
Chris Lew
453bbe3dbd rpmsg: glink: Add name functionality back
IPC logging and IRQ naming depend on the name variable in the glink
data structure. Add device tree name reading code that was removed
by upstream.

Change-Id: Id1c521d94b8a3c9557273d8f8b072e7e87a1b759
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 17:55:32 -07:00
Chris Lew
f540ee360d net: qrtr: ns: Add pr_fmt to ns
Add pr_fmt to the ns file for easier error log matching.

Change-Id: I711735ee60c1fd9fde25850b8e625bb44c04f4c4
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 13:03:32 -07:00
Chris Lew
d94badbdaa net: qrtr: ns: Ignore ENODEV failures in ns
Ignore the ENODEV failures returned by kernel_sendmsg(). These errors
mean either the local port has closed or the remote has gone down.
Neither of these scenarios are fatal and will eventually be handled
through packets that are later queued on the control port.

Also improve the logging messages to print the error code returned by
kernel_sendmsg().

Change-Id: Ibcebd1f44a3fbc87febaa84b11e05675663da5a0
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 13:03:27 -07:00
Chris Lew
16c6929261 net: qrtr: ns: Increase socket recvbuf
Increase the socket recvbuf for the ns so control packets are not
dropped in heavy traffic situations. This change will not
actually set the recvbuf to INT_MAX but to the system defined rmem_max
for sockets.

Change-Id: I860cc1052080cc6e683b44bef1dd9f8fc1899f31
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 13:03:22 -07:00
Chris Lew
a729cfdb0b net: qrtr: ns: create kthread worker to process ns work
If worker is not processing packets on control port fast enough,
socket buffer may get full and result in drop of control packets.

Creating dedicated worker thread to process control packets.

CRs-Fixed: 2763561
Change-Id: I4585015cef2a507a9ba13014cd93f40e60f8a25a
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
2022-10-11 13:02:59 -07:00
Guru Das Srinagesh
456ebaf014 defconfig: pineapple-gki: Enable QCOM_SPSS and dependency
Enable QCOM_SPSS and its dependency, CONFIG_RPMSG_QCOM_SMD.

Change-Id: I4f1446d82a6cd1f7dd43c46519634d70390a4005
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2022-10-10 16:54:06 -07:00
Guru Das Srinagesh
fb861b58bd remoteproc: qcom_spss: Add support for pineapple SoC
Add compatible for pineapple SoC.

Change-Id: I3192184b87fc65af79896033e1ee6333fa8c8b81
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2022-10-10 16:54:05 -07:00
Guru Das Srinagesh
eff864428c remoteproc: Add snapshot of QCOM_SPSS driver
Add snapshot of the QCOM_SPSS driver from msm-5.15 commit 23fe038a2ea4
("Kconfig: Add support for kona chipset").

Change-Id: I7c419a62b14e21d45b3e8bcc2785570012a7c09a
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2022-10-10 16:54:03 -07:00
Vivek Aknurwar
0c91be080b clk: qcom: clk-alpha-pll: Fix pll enable outout
Fix pll enable output incase of when pll is not configured from boot.

Change-Id: I076ae750bad956c37d0a790b07fb9892f3149a0c
Signed-off-by: Vivek Aknurwar <quic_viveka@quicinc.com>
2022-10-10 15:18:38 -07:00
Gokul krishna Krishnakumar
8a22567035 build.config: pineapple: Add flag to enable init_boot build
By enabling this flag init_boot.img will be generated if
the header version is 4.

Change-Id: I8a01d10cee8142ef900376d7e3d29f1b49e80d00
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
2022-10-10 09:59:16 -07:00
Gokul krishna Krishnakumar
80e28b0645 build.config: pineapple: Change Boot header version to 4
Adding Bootconfig to kernel command line to support
the version change.

Change-Id: I24b667e494e5bbf14397f16d9ef7219634f3f17b
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
2022-10-10 09:58:14 -07:00
Tao Zhang
91ab668fcf coresight: etm4x: Fetch device name in sysfs from device tree
If coresight-name exists in etm/ete nodes, use coresight-name value
as device name.

Change-Id: I1297241d8ddc2b29f8745ed33ed5b2089f6b0bcb
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
Signed-off-by: Tao Zhang <quic_taozha@quicinc.com>
Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>
2022-10-09 19:55:10 -07:00
Peng Yang
8432b403d4 swiotlb: fix data abort on pineapple tuivm and oemvm
Before call swiotlb_init_io_tlb_mem, should allocate memory
for areas firstly.

Change-Id: Ib121040817cbae4a44f06ae62fe4b0e0fa27c796
Signed-off-by: Peng Yang <quic_penyan@quicinc.com>
2022-10-09 03:08:32 -07:00
qctecmdr
3a0a1539ac Merge "net: qrtr: ns: Return 0 if server port is not present" 2022-10-07 18:54:45 -07:00
Lazarus Motha
2321eb00ec bus: mhi: host: Enable and update IPC logging usage
Move to IPC logs for the MHI host driver to enable better and
persistent logging that can ensure bootup logs are not lost and
allow ease of pulling logs from crashdumps.

Change-Id: I334335f56acb850f418e5a37b0538545c5b9ea30
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:57 -07:00
Lazarus Motha
4f5e1c26d9 bus: mhi: host: Process invalid BW requests sent by device
When an invalid BW request is sent by the device to the host
to proccess, a value of 0x1 is written to the bw_scale_db
register.

Change-Id: I362e9b308142fe5a9107d46789d26cb38933e858
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:51 -07:00
Hemant Kumar
5a1870bb6b mhi: host: Skip MHI reset if device is in RDDM
In RDDM EE, device can not process MHI reset
issued by host. In case of MHI power off, host
is issuing MHI reset and polls for it to get
cleared until it times out. Since this timeout
can not be avoided in case of RDDM, skip the
MHI reset in this scenarios.

Change-Id: Ide4311ba8705861179bfbfef650f00fa0f97c062
Signed-off-by: Hemant Kumar <quic_hemantk@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:46 -07:00
Lazarus Motha
8407d797f0 mhi: host: Notify MHI clients about fatal error
Currently fatal error notification is done from
fast resume path. This does not cover RDDM EE
change via BHI Intvec. As a result of the some
critical clients are unable to perform cleanup
and does not come up after recovery. In case
if RDDM EE change never comes notify clients
from mhi force reset context.

Change-Id: Iea1f1d86e9a28c08e8d58100715004f3b2abfd96
Signed-off-by: Hemant Kumar <quic_hemantk@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:43 -07:00
Bhaumik Bhatt
f74335f06b bus: mhi: host: Add optional runtime PM last busy update API
This optional runtime PM last busy update callback to the
controller is provided to keep the busy timestamps up to date
from MHI core driver such that it can reset the autosuspend
timer for runtime PM.

Change-Id: Ifc9abce860739b92d29fc257afd169d08a738379
Signed-off-by: Bhaumik Bhatt <quic_bbhatt@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:39 -07:00
Bhaumik Bhatt
5653395337 Revert "bus: mhi: core: Fix MHI runtime_pm behavior"
This reverts commit 4547a749be.
This is done to ensure internal usecases with WLAN are not
impacted with high power usage. Runtime PM get also results in a
WoW exit and is also unnecessary as we already have the if
suspended check and the pending packets counter in place to take
care of rejecting suspends if they occur. The only major benefit
of this patch was to ensure controller is able to mark last busy
timestamp for runtime PM. If needed, support for it can be added
in a future patch to allow controller to update the timestamp.

Change-Id: I3e16ab3631468edd0fda3657adf0f5ae55f0be16
Signed-off-by: Bhaumik Bhatt <quic_bbhatt@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:34 -07:00
Bhaumik Bhatt
09138d7384 bus: mhi: misc: DTR race condition updates
Data terminal ready driver should not be started until other
client drivers are probed so that they can get the necessary
notifications when updates are made available to them by the
device via incoming messages. Adjust flow of the driver and
ensure DTR driver starts after all other devices are created
by core driver.

Change-Id: I9e0bcb87a3b59a66fede0c82ded94a704d16c2a1
Signed-off-by: Bhaumik Bhatt <quic_bbhatt@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:30 -07:00
Hemant Kumar
1c0cd2d26a bus: mhi: host: Take irqsave lock after TRE is generated
Take irqsave lock after TRE is generated to avoid deadlock due to
core getting interrupts enabled as local_bh_enable must not be
called with irqs disabled based on upstream patch.

Change-Id: Id0c34ccddbfa99700ec32319d141cecd3dfbe1f1
Signed-off-by: Hemant Kumar <quic_hemantk@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:26 -07:00
Bhaumik Bhatt
7b8b0f1c27 bus: mhi: core: Update debug print for TRE generation
Include channel number and update the TRE WP print to read the
IOVA properly in order to improve readability.

Change-Id: I80d9c7c2d8722efabb47ccf4b580bd65ab3c9728
Signed-off-by: Bhaumik Bhatt <quic_bbhatt@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:23 -07:00
Vivek Pernamitta
e541397ebd bus: mhi: host: Release mhi_chan write lock on map_single fails
Release mhi_chan write lock before returning on map_single
callback failure.

Change-Id: Iab4bcc878ff5ed7d11c6e943f949ab39dc77b829
Signed-off-by: Vivek Pernamitta <quic_vpernami@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:19 -07:00
Bhaumik Bhatt
90fc13e213 bus: mhi: host: Allow configuration of bidrectional channels
Certain offload channels such as ones for satellite driver
usecases are required to be configured as bidrectional channels.
Allow it to ensure devices are created for them and the channels
are probed.

Added __attribute__((__fallthrough__)) statements to suppress
compiler error.

Change-Id: I782e3e933765099e8ee9eb1670cce321a3dffd8b
Signed-off-by: Bhaumik Bhatt <quic_bbhatt@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:10 -07:00
Bhaumik Bhatt
48799e0f4d bus: mhi: host: Add update transfer state APIs
Add update transfer state APIs and do not check for channel state
in the channel context as device can update it once MHI master
reset has taken place. Instead, rely on local channel and PM
states prior to sending any channel update commands.

Change-Id: Ib3416323e0f1b01ff37c9bd176e72daa4dea9d8d
Signed-off-by: Bhaumik Bhatt <quic_bbhatt@quicinc.com>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:28:02 -07:00
Bhaumik Bhatt
ba41ac151c bus: mhi: host: Add spinlock to protect WP access when queueing TREs
Protect WP accesses such that multiple threads queueing buffers
for incoming data do not race and access the same WP twice.
Ensure read and write locks for the channel are not taken in
succession by dropping the read lock from parse_xfer_event() such
that a callback given to client can potentially queue buffers and
acquire the write lock in that process. Any queueing of buffers
should be done without channel read lock acquired as it can
result in multiple locks and a soft lockup.

Change-Id: Iaa5849da70acd6ece06469312186edc194c7f050
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:27:57 -07:00
Bhaumik Bhatt
4cdf3aac4d bus: mhi: host: Enable support for miscellaneous MHI features
Add a new MHI_BUS_MISC Kconfig entry and support to build
miscellaneous MHI features in Makefile if enabled. It can be
enabled only if necessary for certain controllers and is tied to
module init/exit and MHI registration.

Change-Id: I36429eed9e786681150aceb494bcd06cf3d09ca9
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:27:52 -07:00
Bhaumik Bhatt
20a444391a bus: mhi: core: Fix race between channel preparation and M0 event
There is a race condition where mhi_prepare_channel() updates the
read and write pointers as the base address and in parallel, if
an M0 transition occurs, the tasklet goes ahead and rings
doorbells for all channels with a delta in TRE rings assuming
they are already enabled. This causes a null pointer access. Fix
it by adding a channel enabled check before ringing channel
doorbells.

Change-Id: Idd1f39627a509590e892bf5c853761d351d3d823
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:27:48 -07:00
Bhaumik Bhatt
38dced66d3 bus: mhi: host: Add RDDM check in mhi_pm_resume()
If a device crash occurs when in suspended state, the interrupt
handler cannot access registers to act on it. Once controller is
done with PCIe resume and calls mhi_pm_resume(), MHI host can
check for the RDDM entry and handle it as needed.

Change-Id: I6127b75b51c3ef932e601391daebd0657e1a04eb
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:27:44 -07:00
Vivek Pernamitta
d0737d448d bus: mhi: host: Provide an API to perform host reset request
Adding new API to perform host reset request to device
to collect device side dumps.
Use mhi_soc_reset() API in place of register write
Currently, a direct register write is used when ramdump collection
in panic path occurs. Replace that with new mhi_soc_reset() API
such that a controller defined reset() function is exercised if
one is present and the regular SOC reset is done if it is not.

Change-Id: Ibd15b231072a9b811ced0031387d605184806e9a
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:27:30 -07:00
Bhaumik Bhatt
d933db57d7 bus: mhi: host: Skip power down if RDDM is supported and power up fails
Skip power down if RDDM is supported and power up fails as the
CNSS handling requires it.

Change-Id: I88a2f9e0ea29dd04f76a3a6facb421ac61789bce
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
2022-10-07 17:27:11 -07:00