Commit Graph

1045 Commits

Author SHA1 Message Date
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
Asutosh Mohapatra
19b08fc8ab qcacmn: Add missing device IDs
Currently HMT, HSP_KAILUA, HSP_WAIPIO, NETRANI_HL, NETRANI_MSL
device ids are not present in host driver code.

To address this issue add these device ids in qwlan_hw_list array.

Change-Id: I6ab7399545204e1df6ada836b7ab092fab064b38
CRs-Fixed: 3271889
2022-09-13 13:51:37 -07:00
Tiger Yu
6f012336ae qcacmn: Limit error logging when ce id does not match to tasklet_entry
Limit error logging when ce id does not match to tasklet_entry's ce
id. And dump all tasklet entries info to get more clue in the next
cycle.

Change-Id: Idcd9cb6ff45ef8e05fcea33cad48fa464e4f9a1e
CRs-Fixed: 3284277
2022-09-13 05:03:36 -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
63ab2d8c33 qcacmn: Hif and tgt_if changes for Umac post reset at host
Hif and tgt if layer changes to handle Umac post reset
and post reset complete events from firmware.

Change-Id: I08bbd90741708fe76b2db0371ccfda7bfe7b0b2d
CRs-Fixed: 3267222
2022-08-21 00:38:00 -07:00
Sajini R
f6060a9296 qcacmn: Define target type macro for IPQ53xx
Define target type macro for IPQ53xx

CRs-Fixed: 3268698
Change-Id: I45ad100afb7378b02ee71b11f6db91bd4b92f9a4
2022-08-19 06:40:49 -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
Shwetha G K
72025682f2 qcacmn: Map DBR SVC to CE14
Changes to map the DBR SVC to CE14 on QCN9224 target.

CRs-Fixed: 3212763
Change-Id: I017c0ab03fff6661c883782008e0207806dc426b
2022-08-02 23:39:16 -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
Sajini R
bb7fef80bc qcacmn: Add qca5332 target register structures
Add register structures for qca5332 target.

Change-Id: I66a9855bf849374f26de12fa27a0d938d0f39a9f
CRs-Fixed: 3249489
2022-07-26 08:04:00 -07:00
Rakesh Pillai
81603fe08c qcacmn: Fix format specifier for macro which uses BIT()
BIT() is unsigned long int, and is being printed using
an incorrect format specifier. This leads to a compilation
failure.

Fix the format specifier for macro which uses BIT().

Change-Id: I42a71c3c4a388285809ad17dc62a50bf2df13a5f
CRs-Fixed: 3249816
2022-07-25 05:13:39 -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
Rakesh Pillai
6529ad7117 qcacmn: Enable CE7 history for perf build
Enable CE7 event history for perf build to
have more debug information in-order to
debug issues.

Change-Id: I35f295ca1fef8f29ffa27af49b1aa4e2b3963a87
CRs-Fixed: 3237420
2022-07-11 03:59:23 -07:00
Harsh Kumar Bijlani
fb99e9066d qcacmn: Enable interrupts for CE4 ring
Enable interrupts for CE4 ring for WIN specific
Li and BE platforms.

Change-Id: I1ae28cd0e70ec41fd6ae88c0827ffa3ddfaf8c73
CRs-Fixed: 3226251
2022-07-09 16:58:30 -07:00
Amit Mehta
0e921647c0 qcacmn: Reap all the available Fw diag logs during suspend
Currently in some cases due to pending Fw diag entries in CE7
UMAC is not able to power down.

So to avoid issues during PCI bus suspend reap all the available
diag events to make sure that diag event ring
is empty before allowing the bus to suspend.

Change-Id: Ie628719e3b75ea97e8220fe2b5db5770148d3c93
CRs-Fixed: 3234478
2022-07-07 12:40:20 -07:00
Ananya Gupta
1ceba55644 qcacmn: Do not force reset RTPM usage count during SSR
As part of SSR, usage count of RTPM is reset to zero which
should not be the case as during RTPM stop, usage count is
incremented to 2.
To fix this, do not reset RTPM usage count to 0 when SSR
happens.

Change-Id: Ifab58075b1aa733500a635e34d209ab65c5f63a8
CRs-Fixed: 3233572
2022-07-04 10:16:29 -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
Balaganapathy Palanisamy
54f10bfd1d qcacmn: Avoid IRQ register dump for QCN6122
Do not dump IRQ registers for QCN6122 chip.

Change-Id: If30bb4b944268983c8bc40ea2c9d2caf79e8d012
CRs-Fixed: 3209744
2022-06-30 09:05:52 -07:00
Rakesh Pillai
54239d54dc qcacmn: Fix logging of v3 shadow registers
Currently even if shadow config v3 is enabled,
the logging of shadow registers attempts to print
it from shadow config v2 data structure.

Fix this logging of v3 shadow registers.

Change-Id: Id61eed9477682a91992ccad1eb4864698a0678c1
CRs-Fixed: 3230547
2022-06-29 13:03:06 -07:00
Ananya Gupta
025b889ef6 qcacmn: Check client count below HIF_RTPM_ID_MAX
While registering a client, HIF_RTPM_ID_MAX is also being
checked for registering.
Fix is to exclude HIF_RTPM_ID_MAX id.

Change-Id: I57e572abc22a27586cf350af423293a8b455af1c
CRs-Fixed: 3223394
2022-06-22 09:01:20 -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
Namita Nair
448f3ad74c qcacmn: Increase CE2 ring size
Increase CE2 ring size to reduce
backpressure on this ring.

Change-Id: I4720c136f8bb1e978445d28ec9265aeb0e254ccd
CRs-Fixed: 3211080
2022-06-15 13:54:46 -07:00
Rakesh Pillai
68f96a8c79 qcacmn: Add support to send Shadow config v3
Shadow config v2 can support max of 36 shadow
registers only. For KIWI target, there are 40
shadow registers supported.

Hence add support to send shadow config v3
for KIWI.

Change-Id: If57e6597397da3e239f25a6c0cc24f8fd37dcdf1
CRs-Fixed: 3167758
2022-05-19 01:57:23 -07:00
Kai Liu
15162bf6bd qcacmn: Use default seek for athdiag lseek
Kernel change d4455fa ''proc: mandate ->proc_lseek in "struct proc_ops"'
by default use proc_lseek for file operations, so add default_llseek
for athdiag ops to avoid crash.

Change-Id: I9a36193f8eab44dd619e0c51ccc1f145969027eb
CRs-Fixed: 3197004
2022-05-17 16:45:02 -07:00
Yeshwanth Sriram Guntuka
c18a9b4699 qcacmn: Modify CE4 flag in host CE config for LI and BE targets
Modify CE4 flag in host configuration to support enablement of
copy completion interrupt for Lithium and Beryllium based
targets.

Change-Id: I71ccbaec9707dad59bcb2ee98919285a22eef351
CRs-Fixed: 3195349
2022-05-13 04:21:00 -07:00
Aravind Kishore Sukla
6932ea7f8a qcacmn: Replace kmsg logs to debug logs
Change kernel log level to debug level

Change-Id: Ib2736aff0f653d046d502d460f204bba2247246f
CRs-Fixed: 3182588
2022-05-10 09:11:47 -07:00
Kiran Venkatappa
ae6d816cbf qcacmn: Enable copy engine 14 for diag on qcn9224
Copy Engine(CE14) is used for diag events on qcn9224. Add changes to
configure this CE as dest ring and fix diag event handler to use
wmi_handle from first pdev similar to other WMI events.

Change-Id: I314939169f9be32cd277af68dcd3ef7a0eb06187
CRs-Fixed: 3177987
2022-04-28 06:50:18 -07:00
Jinwei Chen
1e4fecd110 qcacmn: Fix excessive logging in hif_force_wake_request
For KIWI, FISA FSE table is moved from host DDR to CMEM,
then for each time flow learning, it request to force UMAC wake
up then update FSE info in CMEM. currently hif_force_wake_request
will print PCIE_SCRATCH_0_SOC_PCIE_REG register value always,
so when flow learning happened frequently, it might lead to excessive
logging.

Remove the print for successful case, only print register value if
wake up failed.

Change-Id: I87f3b1c8f4ac0fa6270410cf8564b55446b3a40f
CRs-Fixed: 3180175
2022-04-25 01:48:18 -07:00
Yeshwanth Sriram Guntuka
3b9507802e qcacmn: Modify Kiwi CE config to add support for LPASS DP
Modify Kiwi CE host, target, and target_to_service config
to support LPASS datapath service.

Change-Id: Ib4cf47e924b0380bf25828b60ad329f7d8a2789f
CRs-Fixed: 3180744
2022-04-22 14:40:19 -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
Vinay Adella
cbb1a0ec9b qcacmn: Add debug to print the Interrupt enable registers
These are currently enabled only for WIN ahb platforms

Change-Id: Ibd68d5625b6cf790097111c15aece31ea52c0324
CRs-Fixed: 3153652
2022-04-20 11:49:27 -07:00
Chaoli Zhou
d74a42a737 qcacmn: Fix compile error issue
Fix no member named 'pm_dentry' issue if set
WLAN_OPEN_SOURCE=n.

Change-Id: Iadc01285a76385b7d9a696824afcc88964c10014
CRs-Fixed: 3177555
2022-04-20 07:51:56 -07:00
Madhvapathi Sriram
c513ba8b9a qcacmn: Initialize wlan config structure
When RRI over DDR feature is not enabled,
the variable rri_over_ddr_cfg_valid goes uninitialzed.
This can lead to unpredictable behaviour.

Fix this by initializing pld_wlan_enable_cfg to zero
before use.

Change-Id: I485dc552201111834375411b9a493ddbf9a7505c
CRs-Fixed: 3176497
2022-04-20 05:47:03 -07:00
Amit Mehta
b0aa5f2996 qcacmn: Change debug log level
Currently while setting affinity mask we are logging
error print for offline CPUs for which we are not
able to set affinity mask.

Change the log print from error to debug as failing to
set affinity for IRQ on offline CPU is not an actual issue.

Change-Id: Ifbdd3f806022a875bc05e1bdd325c54b267f68cc
CRs-Fixed: 3169900
2022-04-12 23:02:06 -07:00
Ananya Gupta
89beaf8bd7 qcacmn: Increase PCI EP state check time to 150us
Increase busy wait time gap to read PCI EP power state from
100us to 150us.

Change-Id: I1e4623363528bc718749612c0704a81a5113632b
CRs-Fixed: 3152041
2022-03-23 03:32:13 -07:00
Nandha Kishore Easwaran
7e583dccb8 qcacmn: Access dev from scn instead of pci_dev
Access dev from scn instead of pci_dev since pci_dev
can be null for some chipsets like QCN6122

Change-Id: I80c1c13df999f5df900f5cde23d636ed15c551fc
CRs-Fixed: 3151171
2022-03-21 05:35:57 -07:00
chunquan
37d7d4bed0 qcacmn: Replace blacklist abbreviation bl for dl
Replace blacklist abbreviation bl for denylist dl.

Change-Id: Ifdb65060ec65fa65a0804c040734e2563c064b1b
CRs-Fixed: 3153293
2022-03-21 03:17:13 -07:00
chunquan
19cc13911c qcacmn: Replace blacklist/whitelist with denylist/allowlist
Replace blacklist/whitelist with denylist/allowlist
in qca-wifi-host-cmn.

Change-Id: I1a27d025ccb9d5fcc3c573d47a84f9667a229c9b
CRs-Fixed: 3098934
2022-03-05 07:11:01 -08:00
Kiran Venkatappa
6d8cb5bed5 qcacmn: Extend ce_name to include 16 ces for wkk
16 CEs are available in WKK. Extend ce_names array to include 16 CEs to
fix out-of-bound access

Change-Id: I681aee58cb189b726af9d24f3d8fc2bab4ea6f1a
CRs-Fixed: 3136045
2022-03-02 06:56:04 -08: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
Naveen S
7e7019e9d0 qcacmn: Removal of pre lithium wlan driver support in 12.x Software
ipq4019def.c removed

Change-Id: Ib865ec11f7e3081a4fa28e3e3900728139dcf008
2022-02-14 07:12:41 -08:00
Naveen S
0bdaa8fb8a qcacmn: Removing pre lithium wlan driver support in 12.x Software
code related to IPQ4019 removed if_ahb.c and if_ahb_reset.c

Change-Id: I3da65b975221f011ed4190b92177f85ced677785
2022-02-14 07:12:36 -08:00
jinbao liu
9155686ef7 qcacmn: Recording timestamp more precisely in function ce_tasklet
Change location of HIF_CE_TASKLET_ENTRY and HIF_CE_TASKLET_RESCHEDULE
to record the timestamp of entering ce tasklet and ce rescheduling
more precisely. This change can provide a more reliable scene when some
exception occurs.

Change-Id: Ia70488372201ffb906355722043d8405af766c10
CRs-Fixed: 3112970
2022-02-10 00:17:11 -08:00
Madhavan Ganesan
ff60b352ba qcacmn: fill BAR address for AHB chipsets
Add function to fill the BAR address for AHB chipsets.

Change-Id: I77610bed6aadf18829367ae7fff2ea32227d8f9a
2022-02-07 17:56:45 -08:00