Commit Graph

174 Commits

Author SHA1 Message Date
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
Yue Ma
a37a0fb1d8 qcacld-3.0: Add APIs to prevent and allow PCIe enter L1 state
Add PLD APIs to prevent and allow PCIe enter L1 state and L1ss
states.

Change-Id: If5cfb4938aa1e5db277d6a8a381a6a9b6f961bc2
CRs-fixed: 2621669
2020-03-02 17:45:25 -08:00
guangde
7501cf57a7 qcacld-3.0: Add athdiag functions for USB interface
For QCN7605 chip, FW team need athdiag tool to operate FW
information. Host driver need to pass the command and result
between athdiag tool and FW.

Change-Id: Ib3f4498ba560b2b76ec6939760535069777b972c
CRs-Fixed: 2595510
2020-02-14 17:52:29 -08:00
Surabhi Vishnoi
8333061e83 qcacld-3.0: Add pld API to get the audio timestamp
Add pld API to get audio timestamp needed in FTM wlan
timesync feature to synchronise the audio clocks of
master and slave devices

Change-Id: I6f08e33904e26728492286f516ce5a8074afd1ea
CRs-Fixed: 2616917
2020-02-10 04:31:33 -08:00
Jingxiang Ge
19042f697f qcacld-3.0: Reject Vdev trans when driver in unloading/recovering
Previously vdev trans will be rejected if psoc in trans. but
it causes issue when __hdd_psoc_idle_shutdown is in psoc trans,
if ifconfig comes here, the ifconfig will fail.

Add checking if psoc trans in driver recovering and unloading,
if yes, it will be safe to reject vdev trans, otherwise, we should
let vdev trans waiting for psoc trans.

At the same time, we also need to make sure driver state has been
set before psoc trans when unloading.

Change-Id: Ic47eebef76b8eadc90780b74f75d4ebef73b822d
CRs-Fixed: 2601435
2020-01-20 12:31:40 -08:00
Naman Padhiar
07f0c719e2 qcacld-3.0: Add PLD layer for iWCN architecture
Add PLD layer and introdue IPCI bus type for iWCN architecture.

Change-Id: Ia0164314c539df84205263de16432eec0eb7fb34
2020-01-17 08:52:59 -08:00
Naman Padhiar
ed3ada0bb0 qcacld-3.0: Correct API name called from HIF layer
Correct API name for disable irq called from HIF layer.

Change-Id: I353723dec61aba877160dd1faa96afdffc1a416b
2020-01-02 11:39:51 -08:00
Yu Ouyang
36b48bf65a qcacld-3.0: Support ROME SDIO
Function ol_txrx_hl_tdls_flag_reset will call function
ol_txrx_get_vdev_from_vdev_id, it will return NULL vdev
because ol_txrx_hl_tdls_flag_reset is called before
TAILQ_INSERT_TAIL(vdev).
So, move it after TAILQ_INSERT_TAIL(vdev).

Redefinition of 'pld_pcie_register_driver' when
CONFIG_PLD_PCIE_CNSS not defined. For Hastings WHUNT,
HIF_PCI is defined but CONFIG_PLD_PCIE_CNSS is not defined.
So, replace CONFIG_PLD_PCIE_CNSS by HIF_PCI and
CONFIG_PLD_PCIE_FW_SIM.

Change-Id: I05e58516efe6a9a445168a27df9e0cfc9de2e50c
CRs-Fixed: 2589802
2019-12-30 23:54:46 -08:00
Naman Padhiar
fb90ce5ccb qcacld-3.0: Add wrapper APIs for HIF layer
Add wrapper APIs which can be used to route calls
to PLD layer if PLD layer.

Change-Id: I4423483f5f3660f7743832d05fd38b45661d02e7
2019-12-26 11:37:52 -08:00
Tiger Yu
db568a828c qcacld-3.0: Don't set unload flags before unregister_driver when unloading
Don't set unload flags earlier before unregister_driver when driver
unloading to avoid runtime resume failure. And set this flags earlier
before wait_for_ops in the pld_pcie_remove to give chance SSR will be
skipped if unloading is in progress.

Change-Id: I084db32b436148932a2a90e3e1dcb1122f4303b5
CRs-Fixed: 2589413
2019-12-20 20:05:56 -08:00
Karthik Kantamneni
2d65b47bb3 qcacld-3.0: Add WHUNT bus types in pld_lock/unlock_reg_window APIs
Currently pld_lock/unlock_reg_window APIs don't support
WHUNT simulation bus types and treated as error.
Add support for WHUNT simulation buses in lock/unlock
register window APIs.

Change-Id: I1e82d822becaadc9592b693e6ab20331ecb9cbc2
2019-11-19 03:38:43 -08:00
Yue Ma
39b6f2ed51 qcacld-3.0: Add PCIe register window lock related APIs
The register window needs to be configed properly before accessing
any larger than 4K range PCIe registers. Expose the lock in PLD to
avoid race condition when both platform and host drivers
try to config it.

Change-Id: Icd3df3d4d2cc2ecc3df608e7b767a3e654b94500
CRs-Fixed: 2549887
2019-10-28 20:58:30 -07:00
Naman Padhiar
c52e7fd605 qcacld-3.0: Add PLD layer for WHUNT
WHUNT is host unit testing framework which simulates
firmware. Add a PLD wrapper layer for this virtual device.

Change-Id: I1d09b8a18a25b414b0c1d56723cc5687f2bfe297
2019-10-22 03:36:46 -07:00
Arun Kumar Khandavalli
378b7ee6a4 qcacld-3.0: Remove block/unblock shutdown cb
Modem block/unblock shutdown callbacks are added to synchronize
modem shutdown when the driver is in deinit sequence.

With new changes everything is synchronized via the platform driver,
So remove the the block/unblock shutdown callback's.

Change-Id: If66eed5b51bbce64f024edf49e37a21b222a6a4c
CRs-Fixed: 2489733
2019-10-15 02:30:04 -07:00
Nirav Shah
942cdf64c5 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: I3180801308b9a5e85822fb8d8bc04a9ecb42b347
CRs-Fixed: 2530822
2019-10-03 02:01:30 -07:00
Yue Ma
a36c0f1a99 qcacld-3.0: Add QMI send related APIs
These APIs can be used to send data request to firmware over QMI
as well as receive response from firmware.

Change-Id: I186d4c53e846af028b5ea75079027217af1580b4
CRs-fixed: 2517225
2019-10-02 14:54:48 -07:00
Yu Ouyang
523f56e6c3 qcacld-3.0: Fix CNSS_RECOVERY undeclared issue
If without CNSS2 module, CNSS_RECOVERY undeclared issue will occur.

Move function pld_sdio_uevent() to CONFIG_PLD_SDIO_CNSS2 macro,
because it is active only when CONFIG_PLD_SDIO_CNSS2 is defined.

Change-Id: Ic86260ccefad820c47257a8ccbcfae9194b78b8f
CRs-Fixed: 2530671
2019-09-22 21:16:22 -07:00
Alan Chen
50582ca9cb qcacld-3.0: Move clearing recovery flag to after platform driver callback
Platform driver is still doing MHI cleanup at the current location of
clearing the recovery flag. Clear it after platform driver callback.

Change-Id: Ifa81950790fa3d2704ed1aed85301a99c6383470
CRs-Fixed: 2526873
2019-09-18 19:01:57 -07:00
Jayachandran Sreekumaran
8785e2504b qcacld-3.0: Add sdio support for pld update status
Add pld update status api support for sdio

Change-Id: Id96bf8346989dfb2100bff7bd508a499570d2015
CRs-Fixed: 2512562
2019-09-07 23:44:34 -07:00
Jayachandran Sreekumaran
32a0d43f05 qcacld-3.0: Add sdio support for pld_wlan_enable
Add sdio support for pld_wlan_enable to put
the FW in the required mode.

Change-Id: I4ff3648a70b6c9cd4be389562851444258b347e6
CRs-Fixed: 2504554
2019-08-08 11:37:51 -07:00
Vignesh Viswanathan
2f7701a13e qcacld-3.0: Add separate FTM Coldboot Calibration Mode
Add separate Coldboot calibration mode (10) for Coldboot Calibration
done during FTM Mode in PLD.

Change-Id: I7e4bb5209d87613bb49a0a958d8e691c73fdcfe1
CRs-Fixed: 2499766
2019-07-30 20:21:05 -07:00
Sriram Madhvapathi
ecb0bcde59 qcacld-3.0: Add sdio abstraction layer support for QCN7605
The SDIO HIF for QCN7605 requires to use the SDIO Abstraction Layer.
Used the SDIO CNSS2 PLD layer api's to interface with SDIO AL

Change-Id: I839a580941e4651e3dcff4f87cda26cc567687fc
CRs-Fixed: 2275631
2019-07-30 09:11:31 -07:00
Mohit Khanna
6dbf9c8301 qcacld-3.0: Add BW level PLD_BUS_WIDTH_VERY_HIGH
Add additional bandwidth level for "very high" bandwidth. As per the
default configuration if the total number of tx/rx packets exceeds
bus_bw_very_high_threshold, the bus bandwidth requirement is designated
as PLD_BUS_WIDTH_VERY_HIGH and PLD API is called with this value.

Default value of 7000 is chosen for bus_bw_very_high_threshold, which
amounts to 820Mbps of throughput considering a 1500 byte packet and
100ms bandwidth timer interval.

Change-Id: I3bd904429a02ec4935ba12da7c2cfd37eec738ed
CRs-Fixed: 2489362
2019-07-18 09:16:10 -07:00
Mahesh Kumar Kalikot Veetil
64a886965f qcacld-3.0: Add idle state to bus bw logic
Bus bandwidth logic uses PLD_BUS_WIDTH_NONE to vote if the packet
threshold is less than bus_bw_low_threshold. The same vote is used for
system suspend too. Add a new state for bus bandwidth logic to vote for
idle state.

Change-Id: I62ca6fff84a01083001db360f56344a05fb955db
CRs-Fixed: 2484003
2019-07-09 17:26:32 -07:00
Vevek Venkatesan
4a03124774 qcacld-3.0: change prototype of pld_wlan_enable
Change the function prototype of pld_wlan_enable, to use local
version string.

Change-Id: Ic4c46b609afc8f9510a5c4cbf5e708e28c82d066
2019-07-02 08:39:06 -07:00
Sandeep Singh
b2df1387eb qcacld-3.0: Add api to get smmu domain
Add api to get smmu domain from cnss2 platform driver.

Change-Id: I1e0370616bda32b013104db7c086e9611a699f43
2019-06-12 16:14:59 -07:00
Sandeep Singh
75d4b7d4cd qcacld-3.0: Add api to get smmu domain
Add api to get smmu domain from platform driver.

Change-Id: I71efe1a770c8c73f17ffe574555aa9c3b3595819
2019-06-08 06:29:14 -07:00
Rajeev Kumar
588a254004 qcacld-3.0: Add idle restart/shutdown support for PCIe in PLD
Provide platform driver interface for idle restart/shutdown for
PCIe bus in PLD. Remove PCIe power off call for discrete PCIe bus
enabled SoC such that platform driver can execute proper SoC power
off sequence.

Change-Id: If08186247e89a4182cadbf83817dce4f02654ecc
CRs-Fixed: 2431419
2019-05-30 19:29:34 -07:00
Yue Ma
0631a756fb qcacld-3.0: Add PLD API to check DRV connection
Add PLD API in order to check if DRV (Direct Resource Vote) subsystem
is connected or not.

Change-Id: I3b600b0760e27c7111320088034c555aee4ff773
CRs-fixed: 2452039
2019-05-16 05:57:13 -07:00
Yue Ma
b4ebd87f7b qcacld-3.0: Add WLAN device version to SOC info API
Populate WLAN device version related info along with other SOC info
in pld_get_soc_info() API.

Change-Id: Ie0e862c6755d10fbc80b11fbf39d004fafcfd9af
CRs-fixed: 2437413
2019-05-16 02:28:23 -07:00