iwlwifi: pcie: change CSR reset in family 8000
authorEran Harary <eran.harary@intel.com>
Mon, 2 Dec 2013 10:18:10 +0000 (12:18 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 3 Feb 2014 20:23:32 +0000 (22:23 +0200)
This register is not present in 8000 family devices.
There is prph register instead.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Reviewed-by: Dor Shaish <dor.shaish@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/iwl-prph.h
drivers/net/wireless/iwlwifi/pcie/trans.c

index 100bd0d79681a81616109f433e7f6f815d0b575d..fc3b6bee77344491fab3e66ef9507a78bb3d0add 100644 (file)
 /* Device NMI register */
 #define DEVICE_SET_NMI_REG 0x00a01c30
 
+/*
+ * Device reset for family 8000
+ * write to bit 24 in order to reset the CPU
+*/
+#define RELEASE_CPU_RESET              (0x300C)
+#define RELEASE_CPU_RESET_BIT          BIT(24)
+
 /*****************************************************************************
  *                        7000/3000 series SHR DTS addresses                 *
  *****************************************************************************/
index f7e85d3192990574b0d3bdce271bfd060fc7fa65..53a34573f0f033ae9bddd684ac7c4b05d0dd7d17 100644 (file)
@@ -573,6 +573,12 @@ static int iwl_pcie_load_given_ucode(struct iwl_trans *trans,
                }
        }
 
+       /* release CPU reset */
+       if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000)
+               iwl_write_prph(trans, RELEASE_CPU_RESET, RELEASE_CPU_RESET_BIT);
+       else
+               iwl_write32(trans, CSR_RESET, 0);
+
        return 0;
 }