diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2012-12-02 06:07:30 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-12-06 16:24:03 -0500 |
commit | 6a06b6c131d529f2913513355dd9e7c4e05e8e42 (patch) | |
tree | 5880c6e9837014f16bb5b8cfe0018991aecc0a4f /drivers/net/wireless/iwlwifi/iwl-trans.h | |
parent | b7998c8b4459deff3ea9c939e90812439423ab89 (diff) |
iwlwifi: move prph handling into the transport
New transports may handle it internally for better performance.
Also move the tracing inside PRPH access which will make the
output more readable:
iwlwifi_dev_ioread_prph32: Read 0x0 from SCD_AGGR_SEL (32-bit)
instead of the corresponding accesses to HBUS_TARG_PRPH_*.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h index 98072c2067eb..b76532e238c1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans.h | |||
@@ -385,6 +385,8 @@ struct iwl_trans; | |||
385 | * @write8: write a u8 to a register at offset ofs from the BAR | 385 | * @write8: write a u8 to a register at offset ofs from the BAR |
386 | * @write32: write a u32 to a register at offset ofs from the BAR | 386 | * @write32: write a u32 to a register at offset ofs from the BAR |
387 | * @read32: read a u32 register at offset ofs from the BAR | 387 | * @read32: read a u32 register at offset ofs from the BAR |
388 | * @read_prph: read a DWORD from a periphery register | ||
389 | * @write_prph: write a DWORD to a periphery register | ||
388 | * @configure: configure parameters required by the transport layer from | 390 | * @configure: configure parameters required by the transport layer from |
389 | * the op_mode. May be called several times before start_fw, can't be | 391 | * the op_mode. May be called several times before start_fw, can't be |
390 | * called after that. | 392 | * called after that. |
@@ -420,6 +422,8 @@ struct iwl_trans_ops { | |||
420 | void (*write8)(struct iwl_trans *trans, u32 ofs, u8 val); | 422 | void (*write8)(struct iwl_trans *trans, u32 ofs, u8 val); |
421 | void (*write32)(struct iwl_trans *trans, u32 ofs, u32 val); | 423 | void (*write32)(struct iwl_trans *trans, u32 ofs, u32 val); |
422 | u32 (*read32)(struct iwl_trans *trans, u32 ofs); | 424 | u32 (*read32)(struct iwl_trans *trans, u32 ofs); |
425 | u32 (*read_prph)(struct iwl_trans *trans, u32 ofs); | ||
426 | void (*write_prph)(struct iwl_trans *trans, u32 ofs, u32 val); | ||
423 | void (*configure)(struct iwl_trans *trans, | 427 | void (*configure)(struct iwl_trans *trans, |
424 | const struct iwl_trans_config *trans_cfg); | 428 | const struct iwl_trans_config *trans_cfg); |
425 | void (*set_pmi)(struct iwl_trans *trans, bool state); | 429 | void (*set_pmi)(struct iwl_trans *trans, bool state); |
@@ -664,6 +668,17 @@ static inline u32 iwl_trans_read32(struct iwl_trans *trans, u32 ofs) | |||
664 | return trans->ops->read32(trans, ofs); | 668 | return trans->ops->read32(trans, ofs); |
665 | } | 669 | } |
666 | 670 | ||
671 | static inline u32 iwl_trans_read_prph(struct iwl_trans *trans, u32 ofs) | ||
672 | { | ||
673 | return trans->ops->read_prph(trans, ofs); | ||
674 | } | ||
675 | |||
676 | static inline void iwl_trans_write_prph(struct iwl_trans *trans, u32 ofs, | ||
677 | u32 val) | ||
678 | { | ||
679 | return trans->ops->write_prph(trans, ofs, val); | ||
680 | } | ||
681 | |||
667 | static inline void iwl_trans_set_pmi(struct iwl_trans *trans, bool state) | 682 | static inline void iwl_trans_set_pmi(struct iwl_trans *trans, bool state) |
668 | { | 683 | { |
669 | trans->ops->set_pmi(trans, state); | 684 | trans->ops->set_pmi(trans, state); |