if ((D11REV_GE(pi->sh->corerev, 24)) ||
(D11REV_IS(pi->sh->corerev, 22)
&& (pi->pubpi.phy_type != PHY_TYPE_SSN))) {
- W_REG(&pi->regs->radioregaddr, addr);
-#ifdef __mips__
- (void)R_REG(&pi->regs->radioregaddr);
-#endif
+ W_REG_FLUSH(&pi->regs->radioregaddr, addr);
data = R_REG(&pi->regs->radioregdata);
} else {
- W_REG(&pi->regs->phy4waddr, addr);
-#ifdef __mips__
- (void)R_REG(&pi->regs->phy4waddr);
-#endif
+ W_REG_FLUSH(&pi->regs->phy4waddr, addr);
#ifdef __ARM_ARCH_4T__
__asm__(" .align 4 ");
(D11REV_IS(pi->sh->corerev, 22)
&& (pi->pubpi.phy_type != PHY_TYPE_SSN))) {
- W_REG(&pi->regs->radioregaddr, addr);
-#ifdef __mips__
- (void)R_REG(&pi->regs->radioregaddr);
-#endif
+ W_REG_FLUSH(&pi->regs->radioregaddr, addr);
W_REG(&pi->regs->radioregdata, val);
} else {
- W_REG(&pi->regs->phy4waddr, addr);
-#ifdef __mips__
- (void)R_REG(&pi->regs->phy4waddr);
-#endif
+ W_REG_FLUSH(&pi->regs->phy4waddr, addr);
W_REG(&pi->regs->phy4wdatalo, val);
}
if (D11REV_GE(pi->sh->corerev, 24)) {
u32 b0, b1, b2;
- W_REG(&pi->regs->radioregaddr, 0);
-#ifdef __mips__
- (void)R_REG(&pi->regs->radioregaddr);
-#endif
+ W_REG_FLUSH(&pi->regs->radioregaddr, 0);
b0 = (u32) R_REG(&pi->regs->radioregdata);
- W_REG(&pi->regs->radioregaddr, 1);
-#ifdef __mips__
- (void)R_REG(&pi->regs->radioregaddr);
-#endif
+ W_REG_FLUSH(&pi->regs->radioregaddr, 1);
b1 = (u32) R_REG(&pi->regs->radioregdata);
- W_REG(&pi->regs->radioregaddr, 2);
-#ifdef __mips__
- (void)R_REG(&pi->regs->radioregaddr);
-#endif
+ W_REG_FLUSH(&pi->regs->radioregaddr, 2);
b2 = (u32) R_REG(&pi->regs->radioregdata);
id = ((b0 & 0xf) << 28) | (((b2 << 8) | b1) << 12) | ((b0 >> 4)
& 0xf);
} else {
- W_REG(&pi->regs->phy4waddr, RADIO_IDCODE);
-#ifdef __mips__
- (void)R_REG(&pi->regs->phy4waddr);
-#endif
+ W_REG_FLUSH(&pi->regs->phy4waddr, RADIO_IDCODE);
id = (u32) R_REG(&pi->regs->phy4wdatalo);
id |= (u32) R_REG(&pi->regs->phy4wdatahi) << 16;
}
regs = pi->regs;
- W_REG(®s->phyregaddr, addr);
-#ifdef __mips__
- (void)R_REG(®s->phyregaddr);
-#endif
+ W_REG_FLUSH(®s->phyregaddr, addr);
pi->phy_wreg = 0;
return R_REG(®s->phyregdata);
regs = pi->regs;
#ifdef __mips__
- W_REG(®s->phyregaddr, addr);
- (void)R_REG(®s->phyregaddr);
+ W_REG_FLUSH(®s->phyregaddr, addr);
W_REG(®s->phyregdata, val);
if (addr == 0x72)
(void)R_REG(®s->phyregdata);
regs = pi->regs;
- W_REG(®s->phyregaddr, addr);
-#ifdef __mips__
- (void)R_REG(®s->phyregaddr);
-#endif
+ W_REG_FLUSH(®s->phyregaddr, addr);
W_REG(®s->phyregdata, (R_REG(®s->phyregdata) & val));
pi->phy_wreg = 0;
regs = pi->regs;
- W_REG(®s->phyregaddr, addr);
-#ifdef __mips__
- (void)R_REG(®s->phyregaddr);
-#endif
+ W_REG_FLUSH(®s->phyregaddr, addr);
W_REG(®s->phyregdata, (R_REG(®s->phyregdata) | val));
pi->phy_wreg = 0;
regs = pi->regs;
- W_REG(®s->phyregaddr, addr);
-#ifdef __mips__
- (void)R_REG(®s->phyregaddr);
-#endif
+ W_REG_FLUSH(®s->phyregaddr, addr);
W_REG(®s->phyregdata,
((R_REG(®s->phyregdata) & ~mask) | (val & mask)));