* if IL_DL_IO is set */
il_write_direct32(il, HBUS_TARG_MEM_RADDR,
i + IWL4965_RTC_INST_LOWER_BOUND);
- val = _il_read_direct32(il, HBUS_TARG_MEM_RDAT);
+ val = _il_rd(il, HBUS_TARG_MEM_RDAT);
if (val != le32_to_cpu(*image)) {
ret = -EIO;
errcnt++;
/* read data comes through single port, auto-incr addr */
/* NOTE: Use the debugless read so we don't flood kernel log
* if IL_DL_IO is set */
- val = _il_read_direct32(il, HBUS_TARG_MEM_RDAT);
+ val = _il_rd(il, HBUS_TARG_MEM_RDAT);
if (val != le32_to_cpu(*image)) {
IL_ERR("uCode INST section is invalid at "
"offset 0x%x, is 0x%x, s/b 0x%x\n",
CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
}
-static inline u32 _il_read_direct32(struct il_priv *il, u32 reg)
-{
- return _il_rd(il, reg);
-}
-
static inline u32 il_read_direct32(struct il_priv *il, u32 reg)
{
u32 value;
spin_lock_irqsave(&il->reg_lock, reg_flags);
_il_grab_nic_access(il);
- value = _il_read_direct32(il, reg);
+ value = _il_rd(il, reg);
_il_release_nic_access(il);
spin_unlock_irqrestore(&il->reg_lock, reg_flags);
return value;
}
-static inline void _il_write_direct32(struct il_priv *il,
- u32 reg, u32 value)
-{
- _il_wr(il, reg, value);
-}
static inline void
il_write_direct32(struct il_priv *il, u32 reg, u32 value)
{
spin_lock_irqsave(&il->reg_lock, reg_flags);
if (!_il_grab_nic_access(il)) {
- _il_write_direct32(il, reg, value);
+ _il_wr(il, reg, value);
_il_release_nic_access(il);
}
spin_unlock_irqrestore(&il->reg_lock, reg_flags);
static inline u32 _il_read_prph(struct il_priv *il, u32 reg)
{
- _il_write_direct32(il, HBUS_TARG_PRPH_RADDR, reg | (3 << 24));
+ _il_wr(il, HBUS_TARG_PRPH_RADDR, reg | (3 << 24));
rmb();
- return _il_read_direct32(il, HBUS_TARG_PRPH_RDAT);
+ return _il_rd(il, HBUS_TARG_PRPH_RDAT);
}
static inline u32 il_read_prph(struct il_priv *il, u32 reg)
{
static inline void _il_write_prph(struct il_priv *il,
u32 addr, u32 val)
{
- _il_write_direct32(il, HBUS_TARG_PRPH_WADDR,
+ _il_wr(il, HBUS_TARG_PRPH_WADDR,
((addr & 0x0000FFFF) | (3 << 24)));
wmb();
- _il_write_direct32(il, HBUS_TARG_PRPH_WDAT, val);
+ _il_wr(il, HBUS_TARG_PRPH_WDAT, val);
}
static inline void
spin_lock_irqsave(&il->reg_lock, reg_flags);
_il_grab_nic_access(il);
- _il_write_direct32(il, HBUS_TARG_MEM_RADDR, addr);
+ _il_wr(il, HBUS_TARG_MEM_RADDR, addr);
rmb();
- value = _il_read_direct32(il, HBUS_TARG_MEM_RDAT);
+ value = _il_rd(il, HBUS_TARG_MEM_RDAT);
_il_release_nic_access(il);
spin_unlock_irqrestore(&il->reg_lock, reg_flags);
spin_lock_irqsave(&il->reg_lock, reg_flags);
if (!_il_grab_nic_access(il)) {
- _il_write_direct32(il, HBUS_TARG_MEM_WADDR, addr);
+ _il_wr(il, HBUS_TARG_MEM_WADDR, addr);
wmb();
- _il_write_direct32(il, HBUS_TARG_MEM_WDAT, val);
+ _il_wr(il, HBUS_TARG_MEM_WDAT, val);
_il_release_nic_access(il);
}
spin_unlock_irqrestore(&il->reg_lock, reg_flags);
spin_lock_irqsave(&il->reg_lock, reg_flags);
if (!_il_grab_nic_access(il)) {
- _il_write_direct32(il, HBUS_TARG_MEM_WADDR, addr);
+ _il_wr(il, HBUS_TARG_MEM_WADDR, addr);
wmb();
for (; 0 < len; len -= sizeof(u32), values++)
- _il_write_direct32(il,
+ _il_wr(il,
HBUS_TARG_MEM_WDAT, *values);
_il_release_nic_access(il);
/* read data comes through single port, auto-incr addr */
/* NOTE: Use the debugless read so we don't flood kernel log
* if IL_DL_IO is set */
- val = _il_read_direct32(il, HBUS_TARG_MEM_RDAT);
+ val = _il_rd(il, HBUS_TARG_MEM_RDAT);
if (val != le32_to_cpu(*image)) {
IL_ERR("uCode INST section is invalid at "
"offset 0x%x, is 0x%x, s/b 0x%x\n",
* if IL_DL_IO is set */
il_write_direct32(il, HBUS_TARG_MEM_RADDR,
i + IWL39_RTC_INST_LOWER_BOUND);
- val = _il_read_direct32(il, HBUS_TARG_MEM_RDAT);
+ val = _il_rd(il, HBUS_TARG_MEM_RDAT);
if (val != le32_to_cpu(*image)) {
#if 0 /* Enable this if you want to see details */
IL_ERR("uCode INST section is invalid at "