Lines Matching defs:addr

548 #define PORT_CTRL_ADDR(port, addr)		\
549 (addr = KS8842_PORT_1_CTRL_1 + (port) * \
936 * @addr: Physical address of memory buffer.
942 u32 addr;
1617 static inline void set_rx_buf(struct ksz_desc *desc, u32 addr)
1619 desc->phw->addr = cpu_to_le32(addr);
1637 static inline void set_tx_buf(struct ksz_desc *desc, u32 addr)
1639 desc->phw->addr = cpu_to_le32(addr);
1661 * @addr: The address of the table entry.
1667 static void sw_r_table(struct ksz_hw *hw, int table, u16 addr, u32 *data)
1672 ctrl_addr = (((table << TABLE_SEL_SHIFT) | TABLE_READ) << 8) | addr;
1687 * @addr: The address of the table entry.
1694 static void sw_w_table_64(struct ksz_hw *hw, int table, u16 addr, u32 data_hi,
1700 ctrl_addr = ((table << TABLE_SEL_SHIFT) << 8) | addr;
1716 * @addr: The address of the table entry.
1727 static void sw_w_sta_mac_table(struct ksz_hw *hw, u16 addr, u8 *mac_addr,
1748 sw_w_table_64(hw, TABLE_STATIC_MAC, addr, data_hi, data_lo);
1754 * @addr: The address of the table entry.
1764 static int sw_r_vlan_table(struct ksz_hw *hw, u16 addr, u16 *vid, u8 *fid,
1769 sw_r_table(hw, TABLE_VLAN, addr, &data);
1784 * @addr: The address of the counter.
1790 static void port_r_mib_cnt(struct ksz_hw *hw, int port, u16 addr, u64 *cnt)
1797 ctrl_addr = addr + PORT_COUNTER_NUM * port;
1938 u32 addr;
1941 PORT_CTRL_ADDR(port, addr);
1942 addr += offset;
1943 data = readw(hw->io + addr);
1960 u32 addr;
1963 PORT_CTRL_ADDR(port, addr);
1964 addr += offset;
1965 data = readw(hw->io + addr);
1970 writew(data, hw->io + addr);
1977 * @addr: The offset of the register.
1985 static int port_chk_shift(struct ksz_hw *hw, int port, u32 addr, int shift)
1990 data = readw(hw->io + addr);
1999 * @addr: The offset of the register.
2005 static void port_cfg_shift(struct ksz_hw *hw, int port, u32 addr, int shift,
2011 data = readw(hw->io + addr);
2017 writew(data, hw->io + addr);
2031 u32 addr;
2033 PORT_CTRL_ADDR(port, addr);
2034 addr += offset;
2035 *data = readb(hw->io + addr);
2049 u32 addr;
2051 PORT_CTRL_ADDR(port, addr);
2052 addr += offset;
2053 *data = readw(hw->io + addr);
2067 u32 addr;
2069 PORT_CTRL_ADDR(port, addr);
2070 addr += offset;
2071 writew(data, hw->io + addr);
2077 * @addr: The address of the switch register.
2085 static int sw_chk(struct ksz_hw *hw, u32 addr, u16 bits)
2089 data = readw(hw->io + addr);
2096 * @addr: The address of the switch register.
2102 static void sw_cfg(struct ksz_hw *hw, u32 addr, u16 bits, int set)
2106 data = readw(hw->io + addr);
2111 writew(data, hw->io + addr);
2244 u32 addr;
2246 PORT_CTRL_ADDR(port, addr);
2247 addr += KS8842_PORT_IN_RATE_OFFSET;
2248 writel(0, hw->io + addr);
2627 u32 addr;
2629 PORT_CTRL_ADDR(port, addr);
2630 addr += KS8842_PORT_CTRL_VID_OFFSET;
2631 *vid = readw(hw->io + addr);
2670 u32 addr;
2673 PORT_CTRL_ADDR(port, addr);
2674 addr += KS8842_PORT_CTRL_2_OFFSET;
2676 data = readb(hw->io + addr);
2679 writeb(data, hw->io + addr);
4023 static int empty_addr(u8 *addr)
4025 u32 *addr1 = (u32 *) addr;
4026 u16 *addr2 = (u16 *) &addr[4];
5638 * @addr: Buffer of MAC address.
5644 static int netdev_set_mac_address(struct net_device *dev, void *addr)
5649 struct sockaddr *mac = addr;
5766 memcpy(hw->multi_list[i++], ha->addr, ETH_ALEN);