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
Add PLD API in order to check if DRV (Direct Resource Vote) subsystem
is connected or not.
Change-Id: I3b600b0760e27c7111320088034c555aee4ff773
CRs-fixed: 2452039
Populate WLAN device version related info along with other SOC info
in pld_get_soc_info() API.
Change-Id: Ie0e862c6755d10fbc80b11fbf39d004fafcfd9af
CRs-fixed: 2437413
Serialize psoc interface inactivity idle shutdown and restart via PLD
such that platfrom driver can serialize psoc idle shutdown and restart
to driver unload and SSR events to avoid any race conditions.
Change-Id: Ibac40158ad5b94468b09c53eaf7f3d9a3cb8badf
CRs-Fixed: 2430868
Introduces a new build flag 'DYNAMIC_SINGLE_CHIP':
If DYNAMIC_SINGLE_CHIP is defined, which means there
are multiple possible drivers, but only requires one
instance of driver at a time. In such case, leave
MULTI_IF_NAME undefined, no matter what the module
name is, only prepend DYNAMIC_SINGLE_CHIP to names
of firmware/mac/ini files.
Take path of driverdump and ini file for example:
If both MULTI_IF_NAME and DYNAMIC_SINGLE_CHIP are not
defined, the paths are:
driverdump: '/proc/debugdriver/driverdump'
ini: '/<fw_root>/wlan/qca_cld/WCNSS_qcom_cfg.ini'
If DYNAMIC_SINGLE_CHIP is defined as 'qca6174':
driverdump: '/proc/debugdriver/driverdump'
ini: '/<fw_root>/wlan/qca_cld/qca6174/WCNSS_qcom_cfg.ini'
If MULTI_IF_NAME is defined as 'qca6174' and
DYNAMIC_SINGLE_CHIP is not defined:
driverdump: '/proc/debugdriverqca6174/driverdump'
ini: '/<fw_root>/wlan/qca_cld/qca6174/WCNSS_qcom_cfg.ini'
On LA platform, DYNAMIC_SINGLE_CHIP is controlled by
TARGET_WLAN_CHIP and TARGET_MULTI_WLAN:
If more than one WLAN devices are enabled in TARGET_WLAN_CHIP,
and TARGET_MULTI_WLAN is not set to 'true',
DYNAMIC_SINGLE_CHIP will be set to the device name, to
avoid name conflicts of firmware/mac/ini files;
meanwhile, MODNAME is set to 'wlan', then paths for
debugging are not changed.
Otherwise, MULTI_IF_NAME will be defined if requires
multiple instances of driver.
Change-Id: I22ed34d80d3540451bf8b891243c6cdac5a73d7e
CRs-Fixed: 2402432
Currently there is no way to find out PD Restart indication,
so platform driver has added an API to differentiate PD Restart
from SSR. Using this API in shutdown notify handler, sending
message to IPA to do required cleanup.
Change-Id: I9d07c6fc573b6db1c7d0c1b7c99f325e22fe81cd
CRs-Fixed: 2436036
Add update_status callback to pld usb which will be called by
CNSS to update WLAN FW status(FW-DOWN, RECOVERY)
Change-Id: I159e09eac8bdb75525c64e7b42c3315141ec1f8d
CRs-Fixed: 2430265
Define PLD APIs for idle shutdown and restart such that platform
driver can serialize PSOC idle shutdown and restart with driver
load/unload and SSR shutdown/reinit.
Change-Id: I4e772343fbccb099b9af104ac978dcdb650a567a
CRs-Fixed: 2431405
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within pld replace any such comparisons with logical
operations performed on the pointer itself.
Change-Id: I8092ddbb80bb39fc6ff560cca34e021b115f7fd7
CRs-Fixed: 2418390
For now IPA SMMU can only work on ICNSS platform.
Add support for IPA SMMU feature on CNSS platform.
CRs-Fixed: 2286287
Change-Id: I6515d6ec764659f1aeefa50d9fd0b120c47b36bf
pld_snoc_get_soc_info() stack allocates a icnss_soc_info struct before
populating its contents via a call to icnss_get_soc_info(). However,
icnss_get_soc_info() may not populate all of the fields of the struct.
Zero-initialize the struct before passing it to icnss_get_soc_info() to
avoid using any uninitialized values.
Change-Id: I859a880c9fb8483b66e17ded2857634ab878977a
CRs-Fixed: 2396653
A bus can have multiple sub interfaces or pipes.
USB bus for example has endpoints grouped into interfaces.
WLAN uses one of these interfaces.
Each interface has its own "struct device". Add support to save
and retrieve this "struct device".
Also pass interface dev to pld_usb_wlan_enable() as CNSS expects
interface device.
Change-Id: I5800bde107157c35efed848a23b95696bd7f793a
CRs-Fixed: 2371440
Without CNSS module, function pld_pcie_get_user_msi_assignment return zero
even no msi config. For caller function pld_get_user_msi_assignment, zero
means TRUE. It will result to panic when deinit sequence called in
function hif_ce_srng_msi_free_irq. Return correcly value to avoid panic.
Change-Id: Id4480ef1db5357943162472963c4e78d7bfe64b8
CRs-Fixed: 2373130
Currently MAC addresses are generated by driver only.
MAC addresses are queried from platform driver or wlan_mac.bin.
If platform driver gives mac addresses, driver uses it, else it
will use wlan_mac.bin to update MAC addresses. If wlan_mac.bin also
don't have MAC addresses then random MAC addresses are generated
using the HW address or using device serial number.
Add an ini support to enable MAC provisioning. If MAC provisioning
is enabled, ensure that platform driver provides atleast 2 provisioned
MAC addresses. Query the derived addresses also from platform driver.
Generate the remaining random MAC addresses.
Change-Id: Ib943f9de70a78ba5d5e87d81c76b20341893f8e9
CRs-Fixed: 2153836
Currently, driver without CNSS module can't be unloaded when firmware
crashed. Without CNSS module, driver should set recovery in progress
flag to false when fw dump finished or failed. Driver should add ramdump
memory address and length too.
Change-Id: I672c50bd90ada7ff47ddff64ff3b313a75faff13
CRs-Fixed: 2343124
The platform driver uevent handling in WLAN handles both the firmware-
down and "recovery" events. However, the recovery event on snoc
platforms is actually the firmware-crashed event. Recovery _is_ a valid
uevent for pcie platforms, but I20db3698602ea273038a3f024b4e5f61639f6d74
is adding support for the firmware down event.
Additionally, there is no good reason to handle both events, and the
various handling logics are spread across both events with little rhyme
or reason. Remove handling of the "recovery" platform uevent, and move all
associated logic to the firmware-down uevent handling.
Change-Id: I36b6f607438c930dff1936f372af80be311dfe49
CRs-Fixed: 2339357
The snoc wlan platform driver supports snoc API with
the device pointer in all upstream kernel, So remove
the redundant snoc APIs from the pld layer.
CRs-Fixed: 2173110
Change-Id: Iee8bce586569e135da81f9a465a9e7df8b042af4
When the firmware crashes platform driver notifies the driver
through CNSS_FW_DOWN. Since firmware down support is not
present for the PCI bus, The driver flags for target ready
and recovery flags are not getting set resulting in the commands
sent to firmware.
Add the firmware down support for the pci bus.
Change-Id: I20db3698602ea273038a3f024b4e5f61639f6d74
CRs-Fixed: 2338570
As part of PCIe power management for new WLAN devices, it requires
asserting WAKE register before accessing any MMIO registers outside
first 4K range. Add the APIs support in PLD for WLAN host driver.
Change-Id: I307cc6688fca58a52a6eaf3982d675c7a85a6965
CRs-fixed: 2326459
Upon driver reinitialize after a FW rejuvenate,
data packets are not going through IPA path.
Check for FW rejuvenate scenario during driver
recovery and send appropriate message to IPA
driver.
Change-Id: I8c1d7ba78227684cd5653a5927aa4d4c2ce5d354
Crs-Fixed: 2287293
Currently, driver don't fully support MULTI_IF_NAME when two wlan
cards are supported by using two drivers:
1. if two wlan cards are all PCIe, driver can't distinguish
two PCIe cards firmware path.
2. When create hdd sysfs file upper folder, it will repeatly create the
same folder if not use MULTI_IF_NAME to distinguish them. It's not
necessary to distinguish the sub-folder once upper folder is different.
Change-Id: I511de46eec98e736d4e97d5c94ab22592d33f347
CRs-Fixed: 2311137
If modem crashed during wlan driver unloading, icnss driver
will call driver uevent callback to set FW down status in
driver side when it receives BEFORE_SHUTDOWN notification.
If wlan driver is de-initialized just before the callback
is called, kernel will panic as driver's context is freed.
This can be avoid by not setting FW status in host driver.
Instead, icnss driver provides an API to host driver to
check FW status and host driver calls this API before any timeout
assert or accessing HW registers.
CRs-Fixed: 2161431
Change-Id: I8331367dd41dd0cedfa65c63f1bb3ffcb535e1c9
Unregister with usb stack if probe fails.
Not doing so was causing a kernel panic the next time
WLAN device was enumerated.
Change-Id: Ieeeca485774b41156f5587feaa4f7482746f6650
CRs-Fixed: 2263482
Adds support in pld_usb.c for registering with CNSS driver.
pld_usb can now register directly with Linux USB stack or with
CNSS driver.
For QCN7605, registration is to be done with CNSS.
Change-Id: Ibf7e51679e1848bcd8e1acfa43c457f42ff40c0b
CRs-Fixed: 2269602
Update pld soc info by structure member to decouple between pld soc info
with platform soc info.
Change-Id: I0e62d4784d7bccfb2f08d3678e1c78e6baaa9ca9
CRs-Fixed: 2268191
Fix compilation error while enabling QCA_WIFI_3_0_ADRASTEA
and CONFIG_CNSS2 flag for Genoa.
Change-Id: Ic44da39377f722c19edcd291d1b35fac1fee9462
CRs-Fixed: 2267927
When loading sdio driver, need make sure sdio device is recognized,
break driver loading if no device.
Change-Id: I4d47575d793b58970012e4e47cc63b0c197f565d
CRs-Fixed: 2245495
Address the following issue in the core/pld folder:
CHECK: 'bandwith' may be misspelled - perhaps 'bandwidth'?
Change-Id: Ic397c156ff7ba32cec590083098474af16569ea7
CRs-Fixed: 2241943
Qcacld supports multiple driver modules instance generation with
different file names and Kbuild options. Fix driver load time and
compilation errors on this feature.
Change-Id: Ib405e6c475bace31933a28dc64082f2b6c046da9
CRs-fixed: 2197749
Target register is safe to access only after FW ack the wlan
enable request, which is done in hif_enable. Hence set FW ready
state after that.
Change-Id: Ieeb7dd3e1a2400c7b2568869ac27cf7f745c20d5
CRs-Fixed: 2167736
Add device pointer in all PLD PCIe APIs in order to support
numerous WLAN devices.
Change-Id: Id9b2fb14ef3de715f6127ac2301d7ad87d493c14
CRs-fixed: 2134245
These APIs are used with legacy platform driver for PCIe bus based
targets which are no longer needed for new platform driver.
Change-Id: I6e01ea632e902f2c0a3a7cde07c85dfa835b84d3
CRs-fixed: 2134245