Home | History | Annotate | Download | only in net

Lines Matching refs:hw

228 	IS_HW_ERR	= 1<<31,	/* Interrupt HW Error */
276 /* B2_IRQM_HWE_MSK 32 bit IRQ Moderation HW Error Mask */
919 WOL_REG_OFFS = 0x20,/* HW-Bug: Address is + 0x20 against spec. */
2499 struct skge_hw *hw;
2520 static inline u32 skge_read32(const struct skge_hw *hw, int reg)
2522 return readl(hw->regs + reg);
2525 static inline u16 skge_read16(const struct skge_hw *hw, int reg)
2527 return readw(hw->regs + reg);
2530 static inline u8 skge_read8(const struct skge_hw *hw, int reg)
2532 return readb(hw->regs + reg);
2535 static inline void skge_write32(const struct skge_hw *hw, int reg, u32 val)
2537 writel(val, hw->regs + reg);
2540 static inline void skge_write16(const struct skge_hw *hw, int reg, u16 val)
2542 writew(val, hw->regs + reg);
2545 static inline void skge_write8(const struct skge_hw *hw, int reg, u8 val)
2547 writeb(val, hw->regs + reg);
2555 static inline u32 xm_read32(const struct skge_hw *hw, int port, int reg)
2558 v = skge_read16(hw, SK_XMAC_REG(port, reg));
2559 v |= (u32)skge_read16(hw, SK_XMAC_REG(port, reg+2)) << 16;
2563 static inline u16 xm_read16(const struct skge_hw *hw, int port, int reg)
2565 return skge_read16(hw, SK_XMAC_REG(port,reg));
2568 static inline void xm_write32(const struct skge_hw *hw, int port, int r, u32 v)
2570 skge_write16(hw, SK_XMAC_REG(port,r), v & 0xffff);
2571 skge_write16(hw, SK_XMAC_REG(port,r+2), v >> 16);
2574 static inline void xm_write16(const struct skge_hw *hw, int port, int r, u16 v)
2576 skge_write16(hw, SK_XMAC_REG(port,r), v);
2579 static inline void xm_outhash(const struct skge_hw *hw, int port, int reg,
2582 xm_write16(hw, port, reg, (u16)hash[0] | ((u16)hash[1] << 8));
2583 xm_write16(hw, port, reg+2, (u16)hash[2] | ((u16)hash[3] << 8));
2584 xm_write16(hw, port, reg+4, (u16)hash[4] | ((u16)hash[5] << 8));
2585 xm_write16(hw, port, reg+6, (u16)hash[6] | ((u16)hash[7] << 8));
2588 static inline void xm_outaddr(const struct skge_hw *hw, int port, int reg,
2591 xm_write16(hw, port, reg, (u16)addr[0] | ((u16)addr[1] << 8));
2592 xm_write16(hw, port, reg+2, (u16)addr[2] | ((u16)addr[3] << 8));
2593 xm_write16(hw, port, reg+4, (u16)addr[4] | ((u16)addr[5] << 8));
2599 static inline u16 gma_read16(const struct skge_hw *hw, int port, int reg)
2601 return skge_read16(hw, SK_GMAC_REG(port,reg));
2604 static inline u32 gma_read32(const struct skge_hw *hw, int port, int reg)
2606 return (u32) skge_read16(hw, SK_GMAC_REG(port,reg))
2607 | ((u32)skge_read16(hw, SK_GMAC_REG(port,reg+4)) << 16);
2610 static inline void gma_write16(const struct skge_hw *hw, int port, int r, u16 v)
2612 skge_write16(hw, SK_GMAC_REG(port,r), v);
2615 static inline void gma_set_addr(struct skge_hw *hw, int port, int reg,
2618 gma_write16(hw, port, reg, (u16) addr[0] | ((u16) addr[1] << 8));
2619 gma_write16(hw, port, reg+4,(u16) addr[2] | ((u16) addr[3] << 8));
2620 gma_write16(hw, port, reg+8,(u16) addr[4] | ((u16) addr[5] << 8));