Commit Graph

203 Commits

Author SHA1 Message Date
Yue Ma
39066dbed1 qcacld-3.0: Add CONFIG_CNSS_OUT_OF_TREE flag
Use CONFIG_CNSS_OUT_OF_TREE to control if CNSS family drivers are
built from in-kernel-tree source or out-of-kernel-tree source since
the exposed header files will be in different paths. This is also
for backward compatibility.

Change-Id: Icc1253f65a596c8579424f056dcd0fcb5e73a4a1
CRs-fixed: 3022566
2021-08-27 15:12:20 -07:00
Yue Ma
2e49f1156d qcacld-3.0: Handle flags defined as modules properly
The current way in the driver to handle CONFIG_CNSS_UTILS=m and
CONFIG_WCNSS_MEM_PRE_ALLOC=m will not work if the flags are not
coming from kernel Kconfig directly (e.g. CNSS utils and prealloc
module sources are built out of kernel tree) since "cppflags-
$(CONFIG_FLAG) += -DCONFIG_FLAG" will not take effect if CONFIG_FLAG=m.
Fix it in a proper way which is same as handling CONFIG_CNSS_GENL.

Change-Id: Iab4bf34bd1ae89f947bc5f7080e18569810f5f58
CRs-fixed: 3022560
2021-08-27 15:12:16 -07:00
Jinwei Chen
b01dccdb52 qcacld-3.0: suppot WHUNT for CMEM allocation
support WHUNT for CMEM allocation.

Change-Id: I2e28a39bdc5a910526707bc278e6e4a7b08d703f
CRs-Fixed: 2929515
2021-06-23 23:32:28 -07:00
Rakesh Pillai
e86da7276c qcacld-3.0: Changes to enable BE/WCN7850 flags
Changes to enable compilation for beryllium target(chip WCN7850).

CRs-Fixed: 2888534
Change-Id: I7b3d252fc8550883a2d24b6beb2b78f482f5004b
2021-06-04 10:43:23 -07:00
Naman Padhiar
04f511151f qcacld-3.0: Return correct value from PLD layer
For APsI pld_get_mhi_state() and pld_is_pci_ep_awake() return
proper value for buses other than IPCI where these APIs are not
supported.

Change-Id: I2dfe8118d29aa2bc75484ff4d708b21eba264350
2021-06-03 05:52:48 -07:00
Naman Padhiar
8e73a4a3b5 qcacld-3.0: Add support for new uevent from ICNSS2
Add support in PLD layer to handle uevent ICNSS_SMMU_FAULT.

Change-Id: Idf89467f9041281f824ad4c9b2386cbfcee27105
2021-06-02 09:01:41 -07:00
Lin Bai
732ea69682 qcacld-3.0: Add CNSS_BUS_EVENT event handler
CNSS platform will notify bus related event, and add related
handler in CLD driver.

Change-Id: I257f2e09c4fbefa6c4913eb7a7deba165a9b73ec
CRs-Fixed: 2922102
2021-05-13 20:34:03 -07:00
Naman Padhiar
5beeb03f45 qcacld-3.0: Add PLD wrapper for MHI state info
Add pld_get_mhi_state API to get current MHI state and
pld_is_pci_ep_awake to indicate that PCI EP is out of
low power state.

Also enable pld_prevent_l1 and pld_allow_l1 API for WCN6750
to manage low power state of PCI EP from Host.

Change-Id: Ic574bf7d7886b8e59b98e65806b387eef3a54e94
2021-05-11 01:43:53 -07:00
Yue Ma
b4aea4cb8f qcacld-3.0: Add WLAN device memory info to SOC info API
Populate WLAN device memory related info along with other SOC info
in pld_get_soc_info() API.

Change-Id: I4b269e8d96d838b3ea7f998642cc8542cebb00d5
CRs-fixed: 2899892
2021-04-21 13:38:50 -07:00
Manikanta Pubbisetty
1e1ff6bc94 qcacld-3.0: add pld API for disable_irq()
When the SRNG IRQs are disabled during suspend, it is
required to disable the interrupts and wait for interrupts
that are pending to complete. Adding a pld/pfrm API to disable
irq synchronously.

CRs-Fixed: 2908685
Change-Id: Ia1f17d54cbe08e8dc101c0ecc2ddee9275712659
2021-03-31 03:11:19 -07:00
Vevek Venkatesan
a2f248c0ce qcacld-3.0: change pld_ipci_smmu_unmap support only for IPCI type
Currently pld_ipci_smmu_unmap suppot has been added for IPCI,
PCIE_FW_SIM and SNOC_FW_SIM type cases as an error, moving this
unmap support only for type IPCI.

Change-Id: Ib9a60656920d1cc46e28dc269983b7da8dba7d42
CRs-Fixed: 2896804
2021-03-11 11:58:47 -08:00
Vevek Venkatesan
261b2befa0 qcacld-3.0: add PLD API to support SMMU-S1 unmap in moselle
Add PLD API to support SMMU-S1 unmap in moselle platforms.

Change-Id: Ief6b39f30b2f56b00ca0ec2ade42f599f32baa68
CRs-Fixed: 2883862
2021-03-04 16:23:58 -08:00
Karthik Kantamneni
d2e215785c qcacld-3.0: Initialize pld_soc_info to default values
Some of the members in pld_soc_info structure is not assigned by
platform API's. To avoid uninitialized value access by calling
function initialize pld_soc_info to default value.

Change-Id: I4b6816bf72ebb518b1b8af529763c2f8a8edb38d
CRs-Fixed: 2858219
2021-02-03 01:50:04 -08:00
Naman Padhiar
a594cd59dc qcacld-3.0: Collect return value of pld_ipci_smmu_get_domain
Return value of pld_ipci_smmu_get_domain is not collected and
return to caller. Properly collect return value of
pld_ipci_smmu_get_domain.

Change-Id: Ia09f5eba950cb2631f4696fc927c32f49821b9ff
2021-01-30 04:53:35 -08:00
Jinwei Chen
a21bdc0e71 qcacld-3.0: remove CONFIG_PCI_MSM compilation flag
PLD driver already abstract MSM specific feature, remove CONFIG_PCI_MSM
complilation flag in wlan driver.

Change-Id: I44f685561222f2210e70475df23385e4c211c7d1
CRs-Fixed: 2851926
2021-01-11 01:52:32 -08:00
Mohammed Siddiq
76ca8c9fc1 qcacld-3.0: Add pld api to get PCI reg dump on SSR
Add pld api to get PCI register dump on FW crash due
to PCI bus failure.

Change-Id: Ie30edbe2c60b0e71912667491c9fadbbe92373c4
2020-12-10 10:55:12 -08:00
Aasir Rasheed
437828f8f1 qcacld-3.0: Add code to handle hang event data via ICNSS_UEVENT_HANG_DATA
Add code to handle hang event data via ICNSS_UEVENT_HANG_DATA
uevent.

Change-Id: I3efe64fab7c8fcd78eb23f32152ca23e40f1f1f7
2020-11-25 00:51:58 -08:00
Yue Ma
34575137cd qcacld-3.0: Refine kernel-doc comments for force assert FW PLD APIs
Add proper kernel-doc comments for the PLD APIs to force assert FW.
Rename pld_collect_rddm() to pld_force_collect_target_dump() for better
understanding.

Change-Id: I8e0639a120c893dde8ee1cfd5d2aea662eaebf3f
CRs-fixed: 2800567
2020-10-20 21:31:10 -07:00
Alan Chen
d0f9829c04 qcacld-3.0: Add if check before calling cds_force_assert_target()
If CNSS function pld_force_collect_target_dump() returns 0, this means
that FW is already asserted and should not call cds_force_assert_target().
Add an if check for pld_force_collect_target_dump() to only call
cds_force_assert_target() when it is not 0.

Change-Id: Ib784c1a406b93327942164a975994065149aed90
CRs-Fixed: 2799461
2020-10-16 23:43:48 -07:00
Alan Chen
8fb2e3ab02 qcacld-3.0: Use sync API for target assert and dump collection
In internal builds, to catch all fw timeout issues, host-initiated
self-recovery is not enabled. To avoid a race between cld driver
triggering assert and RDDM dump collection, use the CNSS-provided
sync API, which guarantees target assert and dump collection before
returning.

Change-Id: Ib702bfa17616a100913f501f850d5c0b74ad39bb
CRs-Fixed: 2790271
2020-10-10 13:44:44 -07:00
Arun Kumar Khandavalli
b2375e8ce9 qcacld-3.0: Serialize psoc idle shutdown and restart via PLD
Serialize psoc interface inactivity idle shutdown and restart via PLD
such that platform driver can serialize psoc idle shutdown and restart
to driver unload and SSR events to avoid any race conditions.

Change-Id: I177a60eaf83b1c81f08cab2dc8a6bc1497484809
CRs-Fixed: 2776866
2020-10-02 06:47:18 -07:00
Naman Padhiar
001338b360 qcacld-3.0: Send HOST wake up to FW over QMI
As part of WOW feature in WCN6750, send HOST wake up
to FW over QMI instead of WMI. To send HOST wake, add
PLD layer and call platform driver API to send QMI
EXIT_POWER_SAVE to FW.
When FW receive EXIT_POWER_SAVE QMI, it will implicitly
consider that it also received HOST_WAKEUP_FROM_SLEEP
and send ACK for it through CE2.

Change-Id: Ia0a3f4c15662f9ee58649f5c6de965f65aeafe32
CRs-Fixed: 2779370
2020-09-21 16:55:38 -07:00
Paul Zhang
67c55db07a qcacld-3.0: Fix compiler issue about cnss_set_pcie_gen_speed
Since some platform driver does not support for PCIE gen switch,
Using macro PCIE_GEN_SWITCH to control whether function
cnss_set_pcie_gen_speed is invoke or not.

Change-Id: I478cd6426b005014e85c0b3c1c31963045d7322b
CRs-Fixed: 2767110
2020-09-17 21:09:00 -07:00
Chaoli Zhou
320e37d20b qcacld-3.0: Export get driver mode interface
Since PCIE Genoa has separate wlan fw patch for
mission mode(amss.bin) and ftm mode(genoaftm.bin),
but cnss2 platform driver always try to load amss.bin,
which is not feasible. So add this new interface for
cnss2 to get correct driver mode and update the fw
patch name before it start downloading wlan fw

Change-Id: I44565c5f50aa03bbc407ee135ef5b02a040b0df6
2020-09-16 21:04:29 -07:00
Jia Ding
7f57d1c40f qcacld-3.0: Support pld_smmu_unmap for PCIe platform
Add pld_pcie_smmu_unmap API to support SMMU unmap of
addresses mapped in smmu_iova_ipa bank.

Change-Id: Idcb76a4f9d6573fb3f2c1fe22f6fbbe1728fa079
CRs-Fixed: 2768112
2020-09-11 19:08:09 -07:00
Naman Padhiar
c4df5e5e5d qcacld-3.0: Add PLD ops to notify thermal level change
Add PLD layer support using which the platform driver sends
thermal state change notification to WLAN host. The callback
contains state variable to store the current thermal state.

Add WHUNT support to validate host implementation.

Change-Id: I5039eae967f940a7809a4b6e6d523362819fb28a
2020-08-22 20:31:34 -07:00
Manikandan Mohan
a439c17034 qcacld-3.0: Add support for PCIE gen switch
Add PLD layer functions to facilitate PCIE gen switch using
cnss platform driver APIs.

Change-Id: Ie1a3273fa8949131937f43d3551cb500a033d59d
CRs-fixed: 2744991
2020-08-21 14:47:57 -07:00
Jianmin Zhu
e33d286340 qcacld-3.0: Fix channel avoid failure for CONFIG_CNSS_UTILS disabled
Many platforms doesn't enabled CONFIG_CNSS_UTILS,
while pld_set_wlan_unsafe_channel depends on it,
pld_set_wlan_unsafe_channel and pld_get_wlan_unsafe_channel need return 0
instead of -EINVAL, or have side effect on channel avoid feature.

Change-Id: I0967d754314d6fb7f8a289ada3bbcbae2c8b3b5e
CRs-Fixed: 2752409
2020-08-15 22:58:52 -07:00
Sandeep Singh
0615ee270f qcacld-3.0: Enable both SNOC and IPCI PLD layer for ICNSS2
ICNSS2 platform driver is used for moselle and adrastea which uses
IPCI and SNOC PLD layer, respectively. Add support to enable both
for ICNSS2 based to target flag.

Change-Id: I06fbacade99b09c9ea7347aa28e10968eaeedaa8
2020-07-13 23:39:24 -07:00
Lin Bai
299a322de1 qcacld-3.0: Use sync method to awake device
Use sync wake when trying to awake device for register
accessing.
This can avoid device re-enter low power mode after
device_wake asserted.

Change-Id: I9ce421be0ecdf05a26388732cc8e15154c57a47a
CRs-Fixed: 2703608
2020-07-07 07:24:39 -07:00
Vevek Venkatesan
7d7f50849d qcacld-3.0: add Runtime PM support and its PLD callbacks
Add PLD functions for Runtime suspend and resume callbacks,
and enable Runtime PM support for Moselle.

Change-Id: Ie990334c0c60892ec0f0ad6fac3253b3d326a919
CRs-Fixed: 2720832
2020-07-06 14:13:55 -07:00
Yue Ma
7554af3936 qcacld-3.0: Export if DRV is supported through platform capability
Add PLD_HAS_DRV_SUPPORT to platform capability to indicate if PCIe
DRV is supported or not.

Change-Id: I25dcba18b795988c4cdecd3f0c355de6786e0f3f
CRs-fixed: 2722430
2020-07-02 08:48:01 -07:00
Mohammed Siddiq
335ba9e938 qcacld-3.0: Add code to support modularizing ICNSS ICNSS2 and CNSS2
Add code to support modularizing ICNSS, ICNSS2 and CNSS2.

Change-Id: I696715592f6000f2a64f8940f324b699acd5fcf1
CRs-fixed: 2685412
2020-06-29 07:38:04 -07:00
Sandeep Singh
bab49091ef qcacld-3.0: Add ipci apis to send data over QMI
Add PLD layer ipci bus apis to send driver data
to wlan fw over QMI.

Change-Id: I55d4cb337749492cc767da4d024918bcbdd98301
CRs-Fixed: 2714312
2020-06-25 03:49:48 -07:00
Mohammed Siddiq
c09b4e4631 qcacld-3.0: Add ipci apis for SOC wake and athdiag
Add PLD layer ipci bus apis for soc wake request,
wake release, athdiag read and athdiag write.

Change-Id: I966b4d47b6967615c11420d0b991ac175bf7c276
CRs-fixed: 2702459
2020-06-10 07:26:02 -07:00
Rakesh Pillai
7da05db9f2 qcacld-3.0: Add different PLD vote for latency sensitive case
Any connection in 11g/a is very latency sensitive and
we need to vote for a higher DDR frequency than in
the other phy modes.

Identify the number of latency sensitive connections
in STA mode and vote for higher DDR frequency for the
latency sensitive cases.

Change-Id: I2ce20b2b40213bde52211eae659c9673c6e0d305
CRs-fixed: 2695045
2020-06-05 00:48:28 -07:00
Mohammed Siddiq
976e7d13d8 qcacld-3.0: Fix build error for PLs which use 4.14 kernel
Add code to fix build error for PLs which use
4.14 kernel.

Change-Id: I1db1fd13a3d8345abfaee286f109d0699f3559c6
2020-04-28 12:08:18 -07:00
Mohammed Siddiq
b59cdd31cd qcacld-3.0: Add pld pcie code to handle hang event data info
Add code in pld pcie to handle hang event data and length received
from platform driver.

Change-Id: Ibc1b667b6127e2ce6b666e9007bf725ea7e07760
2020-04-24 17:09:19 -07:00
Kai Liu
5a3d4987fa qcacld-3.0: pass supported device id list to platform driver when loading
Wlan driver is built to support different chipset, while on QC platform
function driver and device probe happened in CNSS platform driver,
so when loading wlan driver, need parse supported id list to platform
driver to check if this wlan driver can be loaded in current platform.

Change-Id: I91e87ffa32d77e2bab15fca09514cdefb1075c71
CRs-Fixed: 2644233
2020-04-21 14:04:18 -07:00
Mohammed Siddiq
0865e3866f qcacld-3.0: Add code to handle hang event data via ICNSS_UEVENT_HANG_DATA
Add code to handle hang event data via ICNSS_UEVENT_HANG_DATA
uevent.

Change-Id: Ic423b47177922bbb6634d2ad143f93cd1961dda7
CRs-Fixed: 2665604
2020-04-20 19:19:28 -07:00
Karthik Kantamneni
16b1553717 qcacld-3.0: Add new PLD PCI FW sim API
Add new pld pci fw sim api to read pci configuration header from
host.

Change-Id: Ie1820065f23c7fdf220a4abb9d6975270c2d1766
CRs-Fixed: 2657797
2020-04-08 03:23:46 -07:00
Mohammed Siddiq
d1f55ebdbc qcacld-3.0: initialize pld_uevent_data variable to zero
Initialize pld_uevent_data variable to zero, as the driver
expects zero data if there is no fw down data sent from
platform driver.

Change-Id: I24c3fa459207d254f7b579a387985eca06466447
CRs-fixed: 2658683
2020-04-08 03:23:03 -07:00
Mohammed Siddiq
2dcd202ecf qcacld-3.0: Add pld code to handle hang event data info
Add code to handle hang event data and length received
from platform driver through uevent.
Change-Id: Ie4acf55cd7d2e602ad10eedbdeed045acfd85f56
CRs-fixed: 2650831
2020-04-01 00:20:33 -07:00
Naman Padhiar
f959a91cdd qcacld-3.0: Protect pld_del_dev function as part of psoc trans
Protect pld_del_dev function as part of psoc transaction
to avoid race condition with pld_deinit.

Change-Id: I57531d649d02a37beb702c8f0467dc60b455804b
2020-03-31 15:04:45 -07:00
Karthik Kantamneni
06a63cafdd qcacld-3.0: Moselle changes for WHUNT simulation support
Add PLD layer and config changes for simulating
IPCI virtual device in WHUNT.

Change-Id: Ia07ce0884f0e5ffe9b4d23977476c1789390e1c9
CRs-Fixed: 2648150
2020-03-25 15:25:13 -07:00
Vevek Venkatesan
02f5dfc5d7 qcacld-3.0: add pld_smmu_unmap support for BENGAL
Add support for pld_smmu_unmap and enable it for
BENGAL target.

Change-Id: I7f6d6f965b7664342bca29b49f05f8eb62737a0c
CRs-Fixed: 2642663
2020-03-18 15:37:21 -07:00
Naman Padhiar
ba8266612e qcacld-3.0: Add PLD wrapper for idle restart/shutdown
Add PLD wrapper for idle restart/shutdown callbacks for WCN6750.

Change-Id: I068c4bcfc06f68db43bfbe8c788dccfb2cf5489c
CRs-Fixed: 2642710
2020-03-17 09:15:28 -07:00
Naman Padhiar
580e5e989d qcacld-3.0: Correction in SMMU mapping and interrupt registeration
Add pld wrapper for interrupt registration and SMMU map for
WCN6750.

Change-Id: Iea7130f3462b4d1fb2bf0dde147f7e5f51c491b4
2020-03-09 12:45:03 -07:00
Naman Padhiar
c16cd55f65 qcacld-3.0: Add V2 shadow config for WCN6750
Add shadow configuration version 2 for WCN6750.

Change-Id: I7472b22a83ae4d83ac87f3c064de60f1b07d1e4b
CRs-Fixed: 2633612
2020-03-04 14:10:30 -08:00
Naman Padhiar
518bb3f170 qcacld-3.0: Set platform driver support for WCN6750
Set platform driver support as true for WCN6750.

Change-Id: I52126f263bbc11725531e86defb69010c77b6b9e
2020-03-03 15:54:44 -08:00