summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-io.c
diff options
context:
space:
mode:
authorEran Harary <eran.harary@intel.com>2014-01-23 15:26:32 +0100
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-02-03 21:23:32 +0100
commit189fa2faac49bce07c6c6d83eca21cbe5bf47411 (patch)
tree359d94bf34ed99a36e201bc5f35190ec5ee9e1f5 /drivers/net/wireless/iwlwifi/iwl-io.c
parentiwlwifi: pcie: Disable L0S exit timer for 8000 HW family (diff)
downloadlinux-189fa2faac49bce07c6c6d83eca21cbe5bf47411.tar.xz
linux-189fa2faac49bce07c6c6d83eca21cbe5bf47411.zip
iwlwifi: pcie: fix secure section / dual cpu firmware loading
Also handle the bypass mode in which the second CPU doesn't interfere. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-io.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-io.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.c b/drivers/net/wireless/iwlwifi/iwl-io.c
index f98175a0d35b..07372f2b0250 100644
--- a/drivers/net/wireless/iwlwifi/iwl-io.c
+++ b/drivers/net/wireless/iwlwifi/iwl-io.c
@@ -130,6 +130,21 @@ void iwl_write_prph(struct iwl_trans *trans, u32 ofs, u32 val)
}
IWL_EXPORT_SYMBOL(iwl_write_prph);
+int iwl_poll_prph_bit(struct iwl_trans *trans, u32 addr,
+ u32 bits, u32 mask, int timeout)
+{
+ int t = 0;
+
+ do {
+ if ((iwl_read_prph(trans, addr) & mask) == (bits & mask))
+ return t;
+ udelay(IWL_POLL_INTERVAL);
+ t += IWL_POLL_INTERVAL;
+ } while (t < timeout);
+
+ return -ETIMEDOUT;
+}
+
void iwl_set_bits_prph(struct iwl_trans *trans, u32 ofs, u32 mask)
{
unsigned long flags;