diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2012-12-02 13:07:30 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-12-06 22:24:03 +0100 |
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 98072c2067e..b76532e238c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans.h @@ -385,6 +385,8 @@ struct iwl_trans; * @write8: write a u8 to a register at offset ofs from the BAR * @write32: write a u32 to a register at offset ofs from the BAR * @read32: read a u32 register at offset ofs from the BAR + * @read_prph: read a DWORD from a periphery register + * @write_prph: write a DWORD to a periphery register * @configure: configure parameters required by the transport layer from * the op_mode. May be called several times before start_fw, can't be * called after that. @@ -420,6 +422,8 @@ struct iwl_trans_ops { void (*write8)(struct iwl_trans *trans, u32 ofs, u8 val); void (*write32)(struct iwl_trans *trans, u32 ofs, u32 val); u32 (*read32)(struct iwl_trans *trans, u32 ofs); + u32 (*read_prph)(struct iwl_trans *trans, u32 ofs); + void (*write_prph)(struct iwl_trans *trans, u32 ofs, u32 val); void (*configure)(struct iwl_trans *trans, const struct iwl_trans_config *trans_cfg); 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) return trans->ops->read32(trans, ofs); } +static inline u32 iwl_trans_read_prph(struct iwl_trans *trans, u32 ofs) +{ + return trans->ops->read_prph(trans, ofs); +} + +static inline void iwl_trans_write_prph(struct iwl_trans *trans, u32 ofs, + u32 val) +{ + return trans->ops->write_prph(trans, ofs, val); +} + static inline void iwl_trans_set_pmi(struct iwl_trans *trans, bool state) { trans->ops->set_pmi(trans, state); |