Lines Matching defs:addr
480 #define PORT_CTRL_ADDR(port, addr) \
481 (addr = KS8842_PORT_1_CTRL_1 + (port) * \
868 * @addr: Physical address of memory buffer.
874 u32 addr;
1540 static inline void set_rx_buf(struct ksz_desc *desc, u32 addr)
1542 desc->phw->addr = cpu_to_le32(addr);
1560 static inline void set_tx_buf(struct ksz_desc *desc, u32 addr)
1562 desc->phw->addr = cpu_to_le32(addr);
1584 * @addr: The address of the table entry.
1590 static void sw_r_table(struct ksz_hw *hw, int table, u16 addr, u32 *data)
1595 ctrl_addr = (((table << TABLE_SEL_SHIFT) | TABLE_READ) << 8) | addr;
1610 * @addr: The address of the table entry.
1617 static void sw_w_table_64(struct ksz_hw *hw, int table, u16 addr, u32 data_hi,
1623 ctrl_addr = ((table << TABLE_SEL_SHIFT) << 8) | addr;
1639 * @addr: The address of the table entry.
1650 static void sw_w_sta_mac_table(struct ksz_hw *hw, u16 addr, u8 *mac_addr,
1671 sw_w_table_64(hw, TABLE_STATIC_MAC, addr, data_hi, data_lo);
1677 * @addr: The address of the table entry.
1687 static int sw_r_vlan_table(struct ksz_hw *hw, u16 addr, u16 *vid, u8 *fid,
1692 sw_r_table(hw, TABLE_VLAN, addr, &data);
1707 * @addr: The address of the counter.
1713 static void port_r_mib_cnt(struct ksz_hw *hw, int port, u16 addr, u64 *cnt)
1720 ctrl_addr = addr + PORT_COUNTER_NUM * port;
1860 u32 addr;
1863 PORT_CTRL_ADDR(port, addr);
1864 addr += offset;
1865 data = readw(hw->io + addr);
1870 writew(data, hw->io + addr);
1884 u32 addr;
1886 PORT_CTRL_ADDR(port, addr);
1887 addr += offset;
1888 *data = readb(hw->io + addr);
1902 u32 addr;
1904 PORT_CTRL_ADDR(port, addr);
1905 addr += offset;
1906 *data = readw(hw->io + addr);
1920 u32 addr;
1922 PORT_CTRL_ADDR(port, addr);
1923 addr += offset;
1924 writew(data, hw->io + addr);
1930 * @addr: The address of the switch register.
1938 static int sw_chk(struct ksz_hw *hw, u32 addr, u16 bits)
1942 data = readw(hw->io + addr);
1949 * @addr: The address of the switch register.
1955 static void sw_cfg(struct ksz_hw *hw, u32 addr, u16 bits, int set)
1959 data = readw(hw->io + addr);
1964 writew(data, hw->io + addr);
2091 u32 addr;
2093 PORT_CTRL_ADDR(port, addr);
2094 addr += KS8842_PORT_IN_RATE_OFFSET;
2095 writel(0, hw->io + addr);
2332 u32 addr;
2334 PORT_CTRL_ADDR(port, addr);
2335 addr += KS8842_PORT_CTRL_VID_OFFSET;
2336 *vid = readw(hw->io + addr);
2375 u32 addr;
2378 PORT_CTRL_ADDR(port, addr);
2379 addr += KS8842_PORT_CTRL_2_OFFSET;
2381 data = readb(hw->io + addr);
2384 writeb(data, hw->io + addr);
3650 static int empty_addr(u8 *addr)
3652 u32 *addr1 = (u32 *) addr;
3653 u16 *addr2 = (u16 *) &addr[4];
5263 * @addr: Buffer of MAC address.
5269 static int netdev_set_mac_address(struct net_device *dev, void *addr)
5274 struct sockaddr *mac = addr;
5391 memcpy(hw->multi_list[i++], ha->addr, ETH_ALEN);
6715 u8 addr[ETH_ALEN];
6717 ether_addr_copy(addr, sw->other_addr);
6719 addr[5] += port->first_port;
6720 eth_hw_addr_set(dev, addr);