|
@@ -365,6 +365,11 @@ static int cnss_set_pci_link_status(struct cnss_pci_data *pci_priv,
|
|
|
int cnss_set_pci_link(struct cnss_pci_data *pci_priv, bool link_up)
|
|
|
{
|
|
|
int ret = 0, retry = 0;
|
|
|
+ struct cnss_plat_data *plat_priv;
|
|
|
+ int sw_ctrl_gpio;
|
|
|
+
|
|
|
+ plat_priv = pci_priv->plat_priv;
|
|
|
+ sw_ctrl_gpio = plat_priv->pinctrl_info.sw_ctrl_gpio;
|
|
|
|
|
|
cnss_pr_vdbg("%s PCI link\n", link_up ? "Resuming" : "Suspending");
|
|
|
|
|
@@ -373,6 +378,8 @@ retry:
|
|
|
ret = cnss_pci_set_link_up(pci_priv);
|
|
|
if (ret && retry++ < LINK_TRAINING_RETRY_MAX_TIMES) {
|
|
|
cnss_pr_dbg("Retry PCI link training #%d\n", retry);
|
|
|
+ cnss_pr_dbg("Value of SW_CTRL GPIO: %d\n",
|
|
|
+ cnss_get_input_gpio_value(plat_priv, sw_ctrl_gpio));
|
|
|
if (pci_priv->pci_link_down_ind)
|
|
|
msleep(LINK_TRAINING_RETRY_DELAY_MS * retry);
|
|
|
goto retry;
|