Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09e5185e authored by Frank Liu's avatar Frank Liu
Browse files

cnss: Add PCIE_SWITCH_DELAY when wlan do SSR



Some platforms use a PCIE swith to attach our wifi with other PCIE
card on the same RC like P5459, it will need extra time to stable
signals, otherwise fail to create the pcie link when do SSR, add
PCIE_SWITCH_DELAY to fix the issue.

CRs-Fixed: 1063265
Change-Id: I2b8ea3d8dddbfe4c97f010c608ef5727fdd69bc2
Signed-off-by: default avatarFrank Liu <qiliu@codeaurora.org>
parent 612d726b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@
#define WLAN_VREG_IO_DELAY_MIN	100
#define WLAN_VREG_IO_DELAY_MAX	1000
#define WLAN_ENABLE_DELAY	10
#define PCIE_SWITCH_DELAY       20
#define WLAN_RECOVERY_DELAY	1
#define PCIE_ENABLE_DELAY	100
#define WLAN_BOOTSTRAP_DELAY	10
@@ -2637,6 +2638,13 @@ static int cnss_powerup(const struct subsys_desc *subsys)

	msleep(POWER_ON_DELAY);
	cnss_configure_wlan_en_gpio(WLAN_EN_HIGH);
	/**
	 *  Some platforms have wifi and other PCIE card attached with PCIE
	 *  switch on the same RC like P5459 board(ROME 3.2 PCIE card + Ethernet
	 *  PCI), it will need extra time to stable the signals when do SSR,
	 *  otherwise fail to create the PCIE link, so add PCIE_SWITCH_DELAY.
	 */
	msleep(PCIE_SWITCH_DELAY);

	if (!pdev) {
		pr_err("%d: invalid pdev\n", __LINE__);