diff options
author | Ben Cahill <ben.m.cahill@intel.com> | 2009-11-20 20:04:52 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-23 22:05:30 (GMT) |
commit | 4e03185fb8e85d5624d3a68feced70cc9c9e2136 (patch) | |
tree | b0dba38c77f74b7ea43b468e9a28c10044df6e84 /drivers/net/wireless/iwlwifi/iwl-io.h | |
parent | 3305443c968b98902199bea0abbd9443c6a2bb8d (diff) | |
download | linux-fsl-qoriq-4e03185fb8e85d5624d3a68feced70cc9c9e2136.tar.xz |
iwlwifi: Add iwl_write8()
To support byte writes to CSR_INT_COALESCING and CSR_INT_PERIODIC registers,
add iwl_write8(), including debug/trace support.
Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-io.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-io.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.h b/drivers/net/wireless/iwlwifi/iwl-io.h index d0a358c..e552d4c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-io.h +++ b/drivers/net/wireless/iwlwifi/iwl-io.h @@ -62,6 +62,26 @@ * */ +static inline void _iwl_write8(struct iwl_priv *priv, u32 ofs, u8 val) +{ + trace_iwlwifi_dev_iowrite8(priv, ofs, val); + iowrite8(val, priv->hw_base + ofs); +} + +#ifdef CONFIG_IWLWIFI_DEBUG +static inline void __iwl_write8(const char *f, u32 l, struct iwl_priv *priv, + u32 ofs, u8 val) +{ + IWL_DEBUG_IO(priv, "write8(0x%08X, 0x%02X) - %s %d\n", ofs, val, f, l); + _iwl_write8(priv, ofs, val); +} +#define iwl_write8(priv, ofs, val) \ + __iwl_write8(__FILE__, __LINE__, priv, ofs, val) +#else +#define iwl_write8(priv, ofs, val) _iwl_write8(priv, ofs, val) +#endif + + static inline void _iwl_write32(struct iwl_priv *priv, u32 ofs, u32 val) { trace_iwlwifi_dev_iowrite32(priv, ofs, val); |