Lines Matching +full:data +full:- +full:addr
1 // SPDX-License-Identifier: GPL-2.0-or-later
7 * Copyright (c) 2016-2017 Savoir-faire Linux Inc.
19 * Offset 0x17: AVB Data Register
22 * "6352": 3-bit "op" field, 4-bit "port" field.
23 * "6390": 2-bit "op" field, 5-bit "port" field.
29 /* mv88e6xxx_g2_avb_read -- Read one or multiple 16-bit words.
40 u16 *data, int len) in mv88e6xxx_g2_avb_read() argument
51 return -E2BIG; in mv88e6xxx_g2_avb_read()
64 &data[i]); in mv88e6xxx_g2_avb_read()
72 /* mv88e6xxx_g2_avb_write -- Write one 16-bit word. */
74 u16 data) in mv88e6xxx_g2_avb_write() argument
82 err = mv88e6xxx_g2_write(chip, MV88E6352_G2_AVB_DATA, data); in mv88e6xxx_g2_avb_write()
93 int port, int addr, u16 *data, in mv88e6352_g2_avb_port_ptp_read() argument
99 addr; in mv88e6352_g2_avb_port_ptp_read()
101 return mv88e6xxx_g2_avb_read(chip, readop, data, len); in mv88e6352_g2_avb_port_ptp_read()
105 int port, int addr, u16 data) in mv88e6352_g2_avb_port_ptp_write() argument
108 (MV88E6352_G2_AVB_CMD_BLOCK_PTP << 5) | addr; in mv88e6352_g2_avb_port_ptp_write()
110 return mv88e6xxx_g2_avb_write(chip, writeop, data); in mv88e6352_g2_avb_port_ptp_write()
113 static int mv88e6352_g2_avb_ptp_read(struct mv88e6xxx_chip *chip, int addr, in mv88e6352_g2_avb_ptp_read() argument
114 u16 *data, int len) in mv88e6352_g2_avb_ptp_read() argument
118 addr, data, len); in mv88e6352_g2_avb_ptp_read()
121 static int mv88e6352_g2_avb_ptp_write(struct mv88e6xxx_chip *chip, int addr, in mv88e6352_g2_avb_ptp_write() argument
122 u16 data) in mv88e6352_g2_avb_ptp_write() argument
126 addr, data); in mv88e6352_g2_avb_ptp_write()
129 static int mv88e6352_g2_avb_tai_read(struct mv88e6xxx_chip *chip, int addr, in mv88e6352_g2_avb_tai_read() argument
130 u16 *data, int len) in mv88e6352_g2_avb_tai_read() argument
134 addr, data, len); in mv88e6352_g2_avb_tai_read()
137 static int mv88e6352_g2_avb_tai_write(struct mv88e6xxx_chip *chip, int addr, in mv88e6352_g2_avb_tai_write() argument
138 u16 data) in mv88e6352_g2_avb_tai_write() argument
142 addr, data); in mv88e6352_g2_avb_tai_write()
154 static int mv88e6165_g2_avb_tai_read(struct mv88e6xxx_chip *chip, int addr, in mv88e6165_g2_avb_tai_read() argument
155 u16 *data, int len) in mv88e6165_g2_avb_tai_read() argument
159 addr, data, len); in mv88e6165_g2_avb_tai_read()
162 static int mv88e6165_g2_avb_tai_write(struct mv88e6xxx_chip *chip, int addr, in mv88e6165_g2_avb_tai_write() argument
163 u16 data) in mv88e6165_g2_avb_tai_write() argument
167 addr, data); in mv88e6165_g2_avb_tai_write()
180 int port, int addr, u16 *data, in mv88e6390_g2_avb_port_ptp_read() argument
186 addr; in mv88e6390_g2_avb_port_ptp_read()
188 return mv88e6xxx_g2_avb_read(chip, readop, data, len); in mv88e6390_g2_avb_port_ptp_read()
192 int port, int addr, u16 data) in mv88e6390_g2_avb_port_ptp_write() argument
195 (MV88E6352_G2_AVB_CMD_BLOCK_PTP << 5) | addr; in mv88e6390_g2_avb_port_ptp_write()
197 return mv88e6xxx_g2_avb_write(chip, writeop, data); in mv88e6390_g2_avb_port_ptp_write()
200 static int mv88e6390_g2_avb_ptp_read(struct mv88e6xxx_chip *chip, int addr, in mv88e6390_g2_avb_ptp_read() argument
201 u16 *data, int len) in mv88e6390_g2_avb_ptp_read() argument
205 addr, data, len); in mv88e6390_g2_avb_ptp_read()
208 static int mv88e6390_g2_avb_ptp_write(struct mv88e6xxx_chip *chip, int addr, in mv88e6390_g2_avb_ptp_write() argument
209 u16 data) in mv88e6390_g2_avb_ptp_write() argument
213 addr, data); in mv88e6390_g2_avb_ptp_write()
216 static int mv88e6390_g2_avb_tai_read(struct mv88e6xxx_chip *chip, int addr, in mv88e6390_g2_avb_tai_read() argument
217 u16 *data, int len) in mv88e6390_g2_avb_tai_read() argument
221 addr, data, len); in mv88e6390_g2_avb_tai_read()
224 static int mv88e6390_g2_avb_tai_write(struct mv88e6xxx_chip *chip, int addr, in mv88e6390_g2_avb_tai_write() argument
225 u16 data) in mv88e6390_g2_avb_tai_write() argument
229 addr, data); in mv88e6390_g2_avb_tai_write()