• 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

2204 	struct sky2_hw	     *hw;
2296 static inline int sky2_is_copper(const struct sky2_hw *hw)
2298 return !(hw->flags & SKY2_HW_FIBRE_PHY);
2302 static inline u32 sky2_read32(const struct sky2_hw *hw, unsigned reg)
2304 return readl(hw->regs + reg);
2307 static inline u16 sky2_read16(const struct sky2_hw *hw, unsigned reg)
2309 return readw(hw->regs + reg);
2312 static inline u8 sky2_read8(const struct sky2_hw *hw, unsigned reg)
2314 return readb(hw->regs + reg);
2317 static inline void sky2_write32(const struct sky2_hw *hw, unsigned reg, u32 val)
2319 writel(val, hw->regs + reg);
2322 static inline void sky2_write16(const struct sky2_hw *hw, unsigned reg, u16 val)
2324 writew(val, hw->regs + reg);
2327 static inline void sky2_write8(const struct sky2_hw *hw, unsigned reg, u8 val)
2329 writeb(val, hw->regs + reg);
2337 static inline u16 gma_read16(const struct sky2_hw *hw, unsigned port, unsigned reg)
2339 return sky2_read16(hw, SK_GMAC_REG(port,reg));
2342 static inline u32 gma_read32(struct sky2_hw *hw, unsigned port, unsigned reg)
2345 return (u32) sky2_read16(hw, base)
2346 | (u32) sky2_read16(hw, base+4) << 16;
2349 static inline void gma_write16(const struct sky2_hw *hw, unsigned port, int r, u16 v)
2351 sky2_write16(hw, SK_GMAC_REG(port,r), v);
2354 static inline void gma_set_addr(struct sky2_hw *hw, unsigned port, unsigned reg,
2357 gma_write16(hw, port, reg, (u16) addr[0] | ((u16) addr[1] << 8));
2358 gma_write16(hw, port, reg+4,(u16) addr[2] | ((u16) addr[3] << 8));
2359 gma_write16(hw, port, reg+8,(u16) addr[4] | ((u16) addr[5] << 8));
2363 static inline u32 sky2_pci_read32(const struct sky2_hw *hw, unsigned reg)
2365 return sky2_read32(hw, Y2_CFG_SPC + reg);
2368 static inline u16 sky2_pci_read16(const struct sky2_hw *hw, unsigned reg)
2370 return sky2_read16(hw, Y2_CFG_SPC + reg);
2373 static inline void sky2_pci_write32(struct sky2_hw *hw, unsigned reg, u32 val)
2375 sky2_write32(hw, Y2_CFG_SPC + reg, val);
2378 static inline void sky2_pci_write16(struct sky2_hw *hw, unsigned reg, u16 val)
2380 sky2_write16(hw, Y2_CFG_SPC + reg, val);