• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/net/

Lines Matching refs:hw

2449 	struct skge_hw	     *hw;
2481 static inline u32 skge_read32(const struct skge_hw *hw, int reg)
2483 return readl(hw->regs + reg);
2486 static inline u16 skge_read16(const struct skge_hw *hw, int reg)
2488 return readw(hw->regs + reg);
2491 static inline u8 skge_read8(const struct skge_hw *hw, int reg)
2493 return readb(hw->regs + reg);
2496 static inline void skge_write32(const struct skge_hw *hw, int reg, u32 val)
2498 writel(val, hw->regs + reg);
2501 static inline void skge_write16(const struct skge_hw *hw, int reg, u16 val)
2503 writew(val, hw->regs + reg);
2506 static inline void skge_write8(const struct skge_hw *hw, int reg, u8 val)
2508 writeb(val, hw->regs + reg);
2516 static inline u32 xm_read32(const struct skge_hw *hw, int port, int reg)
2519 v = skge_read16(hw, SK_XMAC_REG(port, reg));
2520 v |= (u32)skge_read16(hw, SK_XMAC_REG(port, reg+2)) << 16;
2524 static inline u16 xm_read16(const struct skge_hw *hw, int port, int reg)
2526 return skge_read16(hw, SK_XMAC_REG(port,reg));
2529 static inline void xm_write32(const struct skge_hw *hw, int port, int r, u32 v)
2531 skge_write16(hw, SK_XMAC_REG(port,r), v & 0xffff);
2532 skge_write16(hw, SK_XMAC_REG(port,r+2), v >> 16);
2535 static inline void xm_write16(const struct skge_hw *hw, int port, int r, u16 v)
2537 skge_write16(hw, SK_XMAC_REG(port,r), v);
2540 static inline void xm_outhash(const struct skge_hw *hw, int port, int reg,
2543 xm_write16(hw, port, reg, (u16)hash[0] | ((u16)hash[1] << 8));
2544 xm_write16(hw, port, reg+2, (u16)hash[2] | ((u16)hash[3] << 8));
2545 xm_write16(hw, port, reg+4, (u16)hash[4] | ((u16)hash[5] << 8));
2546 xm_write16(hw, port, reg+6, (u16)hash[6] | ((u16)hash[7] << 8));
2549 static inline void xm_outaddr(const struct skge_hw *hw, int port, int reg,
2552 xm_write16(hw, port, reg, (u16)addr[0] | ((u16)addr[1] << 8));
2553 xm_write16(hw, port, reg+2, (u16)addr[2] | ((u16)addr[3] << 8));
2554 xm_write16(hw, port, reg+4, (u16)addr[4] | ((u16)addr[5] << 8));
2560 static inline u16 gma_read16(const struct skge_hw *hw, int port, int reg)
2562 return skge_read16(hw, SK_GMAC_REG(port,reg));
2565 static inline u32 gma_read32(const struct skge_hw *hw, int port, int reg)
2567 return (u32) skge_read16(hw, SK_GMAC_REG(port,reg))
2568 | ((u32)skge_read16(hw, SK_GMAC_REG(port,reg+4)) << 16);
2571 static inline void gma_write16(const struct skge_hw *hw, int port, int r, u16 v)
2573 skge_write16(hw, SK_GMAC_REG(port,r), v);
2576 static inline void gma_set_addr(struct skge_hw *hw, int port, int reg,
2579 gma_write16(hw, port, reg, (u16) addr[0] | ((u16) addr[1] << 8));
2580 gma_write16(hw, port, reg+4,(u16) addr[2] | ((u16) addr[3] << 8));
2581 gma_write16(hw, port, reg+8,(u16) addr[4] | ((u16) addr[5] << 8));