iwlwifi: mvm: add additional info for boot info failures
authorMordechay Goodstein <mordechay.goodstein@intel.com>
Sat, 5 Feb 2022 09:21:34 +0000 (11:21 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 18 Feb 2022 08:40:54 +0000 (10:40 +0200)
This info helps for additional info in case we have issues
with OTP at boot time.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20220205112029.7971a6d70653.Icb3ee1e5d52e5437531dadeda63e32719b44b645@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-prph.h
drivers/net/wireless/intel/iwlwifi/mvm/fw.c

index 03d296a..c610f59 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
 /*
- * Copyright (C) 2005-2014, 2018-2021 Intel Corporation
+ * Copyright (C) 2005-2014, 2018-2022 Intel Corporation
  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
  * Copyright (C) 2016 Intel Deutschland GmbH
  */
@@ -386,6 +386,9 @@ enum {
 #define UREG_LMAC1_CURRENT_PC          0xa05c1c
 #define UREG_LMAC2_CURRENT_PC          0xa05c20
 
+#define WFPM_LMAC1_PD_NOTIFICATION      0xa0338c
+#define WFPM_ARC1_PD_NOTIFICATION       0xa03044
+
 /* For UMAG_GEN_HW_STATUS reg check */
 enum {
        UMAG_GEN_HW_IS_FPGA = BIT(1),
index 1e78599..135a715 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
- * Copyright (C) 2012-2014, 2018-2021 Intel Corporation
+ * Copyright (C) 2012-2014, 2018-2022 Intel Corporation
  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
  * Copyright (C) 2016-2017 Intel Deutschland GmbH
  */
@@ -265,6 +265,22 @@ static bool iwl_wait_phy_db_entry(struct iwl_notif_wait_data *notif_wait,
        return false;
 }
 
+static void iwl_mvm_print_pd_notification(struct iwl_mvm *mvm)
+{
+       struct iwl_trans *trans = mvm->trans;
+       enum iwl_device_family device_family = trans->trans_cfg->device_family;
+
+       if (device_family < IWL_DEVICE_FAMILY_8000)
+               return;
+
+       if (device_family <= IWL_DEVICE_FAMILY_9000)
+               IWL_ERR(mvm, "WFPM_ARC1_PD_NOTIFICATION: 0x%x\n",
+                       iwl_read_umac_prph(trans, WFPM_ARC1_PD_NOTIFICATION));
+       else
+               IWL_ERR(mvm, "WFPM_LMAC1_PD_NOTIFICATION: 0x%x\n",
+                       iwl_read_umac_prph(trans, WFPM_LMAC1_PD_NOTIFICATION));
+}
+
 static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm,
                                         enum iwl_ucode_type ucode_type)
 {
@@ -330,6 +346,8 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm,
                                iwl_read_prph(trans, SB_CPU_2_STATUS));
                }
 
+               iwl_mvm_print_pd_notification(mvm);
+
                /* LMAC/UMAC PC info */
                if (trans->trans_cfg->device_family >=
                                        IWL_DEVICE_FAMILY_9000) {