iwlwifi: add force NMI for AX210 devices
authorShaul Triebitz <shaul.triebitz@intel.com>
Mon, 7 Jan 2019 14:36:09 +0000 (16:36 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 14 Feb 2019 09:29:48 +0000 (11:29 +0200)
For AX210 devices, the periphry for forcing NMI
has changed.

Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-io.c
drivers/net/wireless/intel/iwlwifi/iwl-prph.h

index edba087..a704e25 100644 (file)
@@ -307,9 +307,12 @@ void iwl_force_nmi(struct iwl_trans *trans)
        if (trans->cfg->device_family < IWL_DEVICE_FAMILY_9000)
                iwl_write_prph(trans, DEVICE_SET_NMI_REG,
                               DEVICE_SET_NMI_VAL_DRV);
-       else
+       else if (trans->cfg->device_family < IWL_DEVICE_FAMILY_AX210)
                iwl_write_umac_prph(trans, UREG_NIC_SET_NMI_DRIVER,
                                UREG_NIC_SET_NMI_DRIVER_NMI_FROM_DRIVER_MSK);
+       else
+               iwl_write_umac_prph(trans, UREG_DOORBELL_TO_ISR6,
+                                   UREG_DOORBELL_TO_ISR6_NMI_BIT);
 }
 IWL_EXPORT_SYMBOL(iwl_force_nmi);
 
index 3aaa5f0..1af9f9e 100644 (file)
@@ -8,7 +8,7 @@
  * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
  * Copyright(c) 2016        Intel Deutschland GmbH
- * Copyright (C) 2018 Intel Corporation
+ * Copyright (C) 2018 - 2019 Intel Corporation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of version 2 of the GNU General Public License as
@@ -31,7 +31,7 @@
  * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
  * Copyright(c) 2016        Intel Deutschland GmbH
- * Copyright (C) 2018 Intel Corporation
+ * Copyright (C) 2018 - 2019 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -433,4 +433,7 @@ enum {
 #define HPM_DEBUG                      0xA03440
 #define PERSISTENCE_BIT                        BIT(12)
 #define PREG_WFPM_ACCESS               BIT(12)
+
+#define UREG_DOORBELL_TO_ISR6          0xA05C04
+#define UREG_DOORBELL_TO_ISR6_NMI_BIT  BIT(0)
 #endif                         /* __iwl_prph_h__ */