Commit Graph

240 Commits

Author SHA1 Message Date
Venkateswara Naralasetty
9d3b562c0c qcacmn: add NAPI schedule latency and poll time histogram support
Add support for NAPI schedule latency and poll time histogram stats
for WCN6450.

Change-Id: If982ebe4e3cfa80f47c6d2fe9d4cb9dfa318481d
CRs-Fixed: 3485287
2023-05-25 12:08:40 -07:00
Yu Wang
bfebabf7bd qcacmn: extend hif tasklet latency detection
Extend the feature to detect tasklet latency for all CEs.
And also introduce a build flag
DETECTION_LATENCY_TASKLET_MASK to control the enablement
of each, set bit-X to enable detection for CE-X, the
default value is 0x84(BIT(2) | BIT(7)).

Change-Id: I2874d1d50fc5febbf028ebb48ba64e11977c8c34
CRs-Fixed: 3474314
2023-05-24 03:28:48 -07:00
Adwait Nayak
b37c9cf461 qcacmn: Initial changes for Pebble bring-up in HIF Layer.
Add device Id and target type checks for qcn6432 target
compilation.

Change-Id: Id95d5902e3f3711ab6836b72dc3bcb66b1abf3c6
CRs-Fixed: 3351550
2023-04-18 12:44:37 -07:00
Namita Nair
59a36d8e87 qcacmn: Handle deprecated interface calls to IPA
As IPA has moved out of the kernel, ipa_uc_reg_rdyCB
interface call from WLAN is not needed anymore
as ipa_wdi_init_per_inst() initialization call will
handle this. This change will add support to retain
this call only for legacy devices.

Change-Id: Icb479562e091d388e03ef5a38b3e95d4dbf06271
CRs-Fixed: 3459071
2023-04-08 13:33:12 -07:00
Pavankumar Nandeshwar
80d41dc9b4 qcacmn: Handle Umac reset for MLO case
1. Add an API to process trigger_umac_recovery T2H message.
2. Synchronize do_pre_reset, do_post_reset_start, do_post_reset_complete
   messages for all the SOCs and then process these messages in the host.
3. Synchronize pre_reset_done, post_reset_start_done,
   post_reset_complete_done for all the SOCs before sending it to FW.
4. Add a new state in host for trigger_umac_recovery message.
   Ignore back to back trigger_umac_recovery messages received from FW.

Change-Id: Id45d326d63e122834090844e83ad6cc7240f96af
CRs-Fixed: 3425833
2023-03-15 11:20:26 -07:00
Edayilliam Jayadev
63c5956a01 qcacmn: Add APIs to schedule/cancel custom callbacks
Add HIF/CE layer APIs to schedule/cancel custom callbacks.

Change-Id: I9cc7dcf73a726cb1ed2d7945d6ce9e736d42af52
CRs-Fixed: 3408690
2023-03-14 08:45:56 -07:00
Venkateswara Naralasetty
ad3cd5fa15 qcacmn: hif/ce changes for wcn6450
Add the following hif/ce changes to add support for wcn6450,
* New host/target wlan ce config for wcn6450
* New service to pipe map for wcn6450
* New host/ce/target table attach for wcn6450

Change-Id: I20fa1410f5e4e7a0146bc2d0b48a18269ca4a8c9
CRs-Fixed: 3381111
2023-02-26 12:33:47 -08:00
Namita Nair
c6a6c4563d qcacmn: PCIe prevent_l1 for optional wifi dp feature
This change will hold the PCIe in L0 state for the
duration of this feature. The hold will be
released after data transfer is complete.

Change-Id: I762bc3423059ad641bdd00ac5b301a1e1b16f6c2
CRs-Fixed: 3406490
2023-02-23 17:20:37 -08:00
Nandha Kishore Easwaran
f2ffa7ab59 qcacmn: Hif changes for umac reset in QCA5332
Add hif changes for umac reset in QCA5332. Changes are done to read the
umac reset IPC number from dst and request irq for the same.

Change-Id: I0feafb06ef63f37c3ae6db0270bd5ed50debd91d
CRs-Fixed: 3401146
2023-02-12 16:28:00 -08:00
Prakash Manjunathappa
3cde321196 qcacmn: Add PEACH device support
Add support for peach device. Add peach conditional statements.

Change-Id: Ia107e60fd00b4938984414fd92d6699d11fd3797
CRs-Fixed: 3394198
2023-02-07 00:54:44 -08:00
Jeff Johnson
4a8d2ccc87 qcacmn: Fix hif/inc documentation
The kernel-doc script identified a large number of kernel-doc issues
in the hif/inc folder, so fix them.

Change-Id: Idb9a748c71ab71122b74ac9d2665ead474c649ff
CRs-Fixed: 3375492
2023-01-20 13:25:53 -08:00
Hariharan Ramanathan
f75a30225c qcacmn: Add changes to move ioremap outside interrupt context
Add changes to move ioremap of PMM SCRATCH register outside
interrupt context, as ioremap in interrupt context in not valid.

Change-Id: I0fa645c55e10a5241011a1f4ffdccdca48c50d29
CRs-Fixed: 3371194
2023-01-10 05:32:28 -08:00
Li Feng
04014003d6 qcacmn: Add timeout of NAPI polling for single MSI case
Observed NAPI of REO2SW1 hard to complete caused by slow CPU/schedule
on REO2SW1, hence IRQ of REO2SW1 keep disabled during the polling which
impact other MSI as well in single MSI case, until hit REO2TCL timeout
and crash.

The fix is complete the dp rx NAPI poll and re-enable the irq if the
irq disabled for long time.

Change-Id: I5e70d9646b78307ab0c35e2ac0d6e3647804c476
CRs-Fixed: 3332143
2022-12-04 10:08:53 -08:00
Yeshwanth Sriram Guntuka
f2bb688784 qcacmn: Modify existing API to fetch direct link dest buf size
Modify existing API used to fetch direct link destination
buffers to also get destination buffer size.

Change-Id: I6c220fe9bbb216f1c0db2e1e38da2ce8314fe47b
CRs-Fixed: 3347321
2022-12-02 21:56:20 -08:00
Hariharan Ramanathan
b673b97a2d qcacmn: Interrupt Changes for QCA5332
Added interrupt registering code for tx monitor and umac_reset

Change-Id: Id76329a908859a512cef23d68a4afbff794af09a
CRs-Fixed: 3340347
2022-11-27 01:50:43 -08:00
Karthik Kantamneni
6ef5d59bee qcacmn: Add Runtime PM last busy history support
Add support to record last busy events on RX CEs,
this helps to check how frequent CEs are marking busy.

Add support to display last busy history and runtimepm stats.

Change-Id: I856ce54a2f1c6b26722d27623343fc0a2c202c6f
CRs-Fixed: 3337902
2022-11-20 22:03:28 -08:00
Ananya Gupta
f1f6845bfb qcacmn: Export API to change delay for RTPM timeout
Store ini config delay value and current delay value in RTPM
context
Export API to update delay and get current delay in ms for RTPM
timeout.
Export API to restore delay to default value.

Change-Id: I53e9e17d983c2cc6fe317159c8c46d792e56c04e
CRs-Fixed: 3332132
2022-11-16 15:37:05 -08:00
Yeshwanth Sriram Guntuka
9b059a3bc0 qcacmn: Add support for getting CE srng info for Direct Link
Add support to fetch CE srng information used for
direct link datapath.

Change-Id: If38b892b28eba711d7949fa02926205dc601a50e
CRs-Fixed: 3317501
2022-11-12 03:11:01 -08:00
Yeshwanth Sriram Guntuka
e228622034 qcacmn: Add support to configure MSI registers for Direct Link CE
The MSI address and data information for Direct Link
copy engines will be available once the WiFi driver
on LPASS is initialized. Add support to configure the
IPCC address and data values into Direct Link copy
engines at runtime.

Change-Id: I5e7dff90c2f1ff764462c235deb5795ed019a16b
CRs-Fixed: 3316679
2022-11-12 03:10:53 -08:00
Kannan Saravanan
04a752e875 qcacmn: Initial changes for york bring-up in HIF Layer
Add device Id and target type checks for qcn9160 target
compilation.

Change-Id: I40f5ae3f1ac715f977f9df5a46c71740c61c7399
CRs-Fixed: 3282629
2022-10-18 10:08:21 -07:00
Jeff Johnson
207faf54f2 qcacmn: hif: Fix misspellings
Fix misspellings in hif/...

Change-Id: I8eeefbf714bbb66f61886d9ceabe3f28607b045c
CRs-Fixed: 3304686
2022-10-10 19:21:54 -07:00
Hariharan Ramanathan
433a137917 qcacmn: HIF changes for QCA5332
1. Changes to support cmem write for AHB devices.
2. Interrupt enablement issue - Incorrect CE address was given which is
fixed.
3. dp_soc_init failure - dev_base_addr of Miami was NULL, which is
fixed.
4. Missing interrupt error logs - Added dummy entires for missing
interrupt in DTS and changes to support shared IRQ in wifi-drivers

Change-Id: I00e7666b2b978c35b5ccec5da21bf442ed0a7998
CRs-Fixed: 3268936
2022-09-13 16:46:32 -07:00
Sajini R
5d150285fd qcacmn: Initial changes in hif for ipq5332 target compilation
Added device ID and target type checks in hif for ipq5332 traget
compilation.

CRs-Fixed: 3273827
Change-Id: I771d741c204695a678bf22bccd039047b9dc8356
2022-08-24 09:01:21 -07:00
Pavankumar Nandeshwar
1607e73a26 qcacmn: HIF changes for umac prereset handling
Handle Umac prereset event from firmware.

Change-Id: I88a25ae8eb403af40f044de4500ce42729da1e49
CRs-Fixed: 3174560
2022-08-11 15:23:20 -07:00
Yu Tian
11df417c3b qcacmn: Add Link stats check before ring access directly
Throughput based RTPM logic of ring access may fail and
lead to NOC error in some corner cases. Change is aimed
to add additional link states check to prevent invalid SRNG
access.

Change-Id: I7e7edbadfd21b4857efa4faff0ada6d94d682f2c
CRs-Fixed: 3256702
2022-08-08 07:49:39 -07:00
Yeshwanth Sriram Guntuka
b4ff9ea317 qcacmn: Add functionality for rtpm prevent suspend sync
Add provision to call sync prevent suspend which will wait for
system to resume and increment usage_count before returning.

Change-Id: I855e3fc2660dc7f3f78bb70f8eef6228cbef96d3
CRs-Fixed: 3253335
2022-08-08 05:47:18 -07:00
Nidhi Jain
18377a6679 qcacmn: Add qcn9224defs for wkk v2
Added new file specific to qcn9224 v1 defs. Use qcn9224defs.c for v2.
Added changes specific to soc version check.

Change-Id: I5b6aedbb8aba2de847e0f4d47212a25b36bfa7c8
CRs-Fixed: 3243676
2022-08-01 01:34:59 -07:00
Karthik Kantamneni
50c8489faf qcacmn: Add support to log latest CE descriptor history
Add support to log latest CE descriptor history which helps
to identify CE scheduling/reaping delays when full debug
history dump is not available.

Change-Id: I44a5c86a3e1dd4861bfd2e77b3f772d5d53bcedf
CRs-Fixed: 3225155
2022-07-21 05:50:56 -07:00
Nandha Kishore Easwaran
93bf7e1fb1 qcacmn: Schedule CE tasklet when resource runs out
If there is no resourse to send packet via HTC, then check if interrupts
are not processed from that CE for last 3 seconds. If so, schedule a
tasklet to reap available entries. Also if Queue has reached 1024 entries
within 3 seconds, then also schedule tasklet.

This change is added because there is a case where intermittently
completion interrupts are not received from CE3 and hence adding
this WAR in host to come out of this issue scenario.

Change-Id: I126cd5e678517127659237308f8f6b1313f8f422
CRs-Fixed: 3234943
2022-07-14 01:02:11 -07:00
Shiva Krishna Pittala
053f59e4f0 qcacmn: Interrupt handling changes for UMAC HW reset interrupt
Create a HIF context for UMAC reset handler, register the datapath UMAC HW
reset callback handler with HIF layer, request for UMAC HW reset interrupt,
and schedule a high priority tasklet to process the interrupt in which
call the registered DP callback handler.

CRs-Fixed: 3184312
Change-Id: Iefc811bf0d1b093c3c63bf2238c94a1448f4f139
2022-07-13 15:25:24 -07:00
Srinivas Girigowda
6d056b9959 qcacmn: Add support for Mango device id
Add support for Mango device id.

Change-Id: I2b32a39e258caab408723db77f132af364dc6b04
CRs-Fixed: 3232512
2022-07-02 09:55:56 -07:00
Ananya Gupta
4021d4b379 qcacmn: Restructure HIF Runtime PM module
Currently, different modules had different ways of allowing
and preventing runtime suspend. Multiple debug mechanisms
were introduced and workarounds are present as well bloating
the runtime PM module.
This change is done to clean up and restructure HIF runtime
PM module. Modules using Runtime PM module need to register
with an ID present in hif_rtpm_client_id.
hif_rtpm_get() will increment the device usage_count and
prevent device from suspending. Based on argument type, if
system is suspended, subsequent resume action will be done.
hif_rtpm_put() will decrement the usage_count of device and
if it is NULL, based on type of put call, idle sequence will
start. Register HIF module and update respective get and put
calls done from HIF module.

Change-Id: I23747f0f7208e689c1c9eb55789aa81945f596ec
CRs-Fixed: 3169272
2022-06-18 23:11:18 -07:00
Jingxiang Ge
4c3d1cbd29 qcacmn: Change ce desc history from dynamic to static
As dynamic allocation occupy cnss prealloc memory, which may
cause this prealloc pool to be exhausted.

Move dynamic memory to static.

Change-Id: Ia3500868cbcdbd9676f72a3588462ab0d6a21088
CRs-Fixed: 3171015
2022-04-20 13:07:54 -07:00
Jinwei Chen
a8fe61c936 qcacmn: Prevent runtime PM suspending during hif_force_wake_request
Currently if write non-shadow register and not in initial
phase, host will call hif_force_wake_request()-->
pld_force_wake_request_sync(), but this API can not guarantee
MHI/PCIe is in wake state if runtime PM suspending is ongoing
in parallel, later any register accessing through PCIe bus will hit
NOC error.

Add hif_pm_runtime_get_sync() in hif_force_wake_request() to prevent
runtime PM suspending.

Change-Id: Id60c6041a830d9ad27b0b4173a036c9c57fbf350
CRs-Fixed: 3120170
2022-03-02 03:09:12 -08:00
Nandha Kishore Easwaran
d9ce043299 qcacmn: Legacy interrupt changes
Add Legacy interrupt changes for Beryllium target. Added code to initialize
legacy interrupt for Copy engines and also to request irq for hif group.

Change-Id: Idb5635d376b9dfcf1e4c595a829d7bef467870b4
2022-02-27 23:46:23 -08:00
Naveen S
8b6625530d qcacmn: Removal of pre lithium wlan driver support in 12.x Software
Code related to IPQ4019 is removed

Change-Id: I64ef452cafe64840576f40a8f35bc617b9978c96
2022-02-14 07:12:47 -08:00
Aditya Kodukula
ed41e85970 qcacmn: Align the string entries in rtpm_string_from_dbgid()
Align the string entries inside the rtpm_string_from_dbgid()
function in the order of wlan_rtpm_dbgid enum entries.

Change-Id: I455e93723f5df882babb758a4979d1b1cecd8e7e
CRs-Fixed: 3128352
2022-02-11 06:02:24 -08:00
Kiran Venkatappa
6cd22afb21 qcacmn: Add hif API to get WMI ep count from svc map
Different targets can have different WMI endpoint count. Add an API to
get this count from the target service map. This API can be used to get
max WMI ep count for a target to perform endpoint connect request only
till possible count.

Change-Id: Id90bcadfb23fbff12d10bf8b6ca825142d3f1bdc
CRs-Fixed: 3121598
2022-02-02 03:16:19 -08:00
Aditya Kodukula
4d53144b89 qcacmn: Add new entry to wlan_rtpm_dbgid enum
Add a new entry RTPM_ID_SOC_IDLE_SHUTDOWN to the enum
wlan_rtpm_dbgid.

Change-Id: Idf2ee1655a0c353693749d76095ec65dfb08ba25
CRs-Fixed: 3120187
2022-02-01 23:35:53 -08:00
Neha Bisht
5f8681ff1e qcacmn: Enable the 4th Tx. completion ring
Enable the 4th Tx. completion ring to save CPU load
Initialization and interrupt handling for 4th completion ring
is done here.

Change-Id: I2db27218a3c3e14d719d012f03454a6a7aa647fe
2022-02-01 21:04:30 -08:00
Jingxiang Ge
a1f2c00c65 qcacmn: Always enable ce debug history for ce2/ce3
Current there is no ce debug history when testing
perf build, so it is hard to debug some issue.

Here it only enable ce2/ce3 on perf build, which keep
only necessary log here.

Change-Id: I29b998939cfa25f0547a9871721c6daeb0fdd961
CRs-Fixed: 3058740
2022-01-26 01:04:24 -08:00
sandhu
ad2829718c qcacmn: Remove IP from files
remove IP from code

Change-Id: If119a4af213b10aadb9f1344e50b0342e72405c2
CRs-Fixed: 3073864
2021-12-29 04:28:58 -08:00
Yeshwanth Sriram Guntuka
299b26a366 qcacmn: Featurize support for grp irq affinity
Add a feature flag for grp irq affinity support
changes.

Change-Id: I0a97dd85369aae66450e4869b591c7af74a66960
CRs-Fixed: 3070324
2021-11-12 22:52:21 -08:00
Yeshwanth Sriram Guntuka
d9eb751658 qcacmn: Add support to affine individual grp irqs
Add support to affine individual grp irqs to either
perf or non-perf cluster.

Change-Id: I90006645acb82b71c63d2255722e2c67bb7a2f46
CRs-Fixed: 3059676
2021-11-08 05:19:31 -08:00
Karthik Kantamneni
4c00b017c8 qcacmn: Add HIF events to track NAPI POLL exit time
Add HIF events to track NAPI POLL exit time, this gives
information about actual time spent by wlan host in napi softirq.

Change-Id: I7548fd05f2f7db714ac9bcf79171ffb3d478e936
CRs-Fixed: 3052902
2021-10-12 13:16:48 -07:00
Jingxiang Ge
0f98450843 qcacmn: Replace RET_IP with rtpm_dbgid for runtime pm api
Current it use __RET_IP to get caller in rtpm resume
function, if it print info by %ps, it will do a
symbol lookup which takes time.

Change as replacing __RET_IP with rtpm_dbgid, so it is
still able to get caller information and avoid time
cost here.

Change-Id: Ifc70c118d621bb9e6d12de87582de09316ae9cad
CRs-Fixed: 3001690
2021-07-30 04:04:50 -07:00
Abdul Muqtadeer Ahmed
f284efa6f8 qcacmn: Refactor the hif_latency detection code based on the bitmap
Based on the bitmap whether the issue is because of the
HIF_DETECT_TASKLET or HIF_DETECT_CREDIT, the hif_latency detection
code needs to be refactor to different functions so that it will
help parsing tools to find the reason of crash.

Change-Id: I2d8a83493354dfbd1c484cb7727018ddeb14c158
CRs-Fixed: 2929736
2021-07-28 06:39:06 -07:00
Ananya Gupta
f2851b458b qcacmn: Affine rx_err srng to all CPUs except 0
IPA and rx_err ring are processed in same CPU resulting
in low Tput.
To fix this, not allow processing of rx_err ring in
CPU 0

Change-Id: Id53a03c9290607beb1a595c84bfb0fd8d9f5d105
CRs-Fixed: 2949569
2021-07-27 01:00:14 -07:00
Karthik Kantamneni
7bf43ce817 qcacmn: Wait till EP vote is released after reg work completion
After reg work is complete there is possiblity EP vote reset
request still not processed by F.W. So wait till EP vote reset
is done after reg work completion.

Change-Id: I1f4e318ac96ba3a15c613c5faf5095d4be7c8e99
CRs-Fixed: 2994233
2021-07-22 12:53:20 -07:00
Karthik Kantamneni
b7e633e910 qcacmn: Add api to set intermediate EP vote access
Add api to set intermediate EP vote access state.
Make sure reg work handler is complete before setting
intermediate vote access.

Change-Id: Ib229d9af8b1e58505a9ae5fbf39aa912ca21a3c3
CRs-Fixed: 2994040
2021-07-22 12:53:16 -07:00