Lines Matching full:addr

26 static int w5100_spi_read(struct net_device *ndev, u32 addr)  in w5100_spi_read()  argument
29 u8 cmd[3] = { W5100_SPI_READ_OPCODE, addr >> 8, addr & 0xff }; in w5100_spi_read()
38 static int w5100_spi_write(struct net_device *ndev, u32 addr, u8 data) in w5100_spi_write() argument
41 u8 cmd[4] = { W5100_SPI_WRITE_OPCODE, addr >> 8, addr & 0xff, data}; in w5100_spi_write()
46 static int w5100_spi_read16(struct net_device *ndev, u32 addr) in w5100_spi_read16() argument
51 ret = w5100_spi_read(ndev, addr); in w5100_spi_read16()
55 ret = w5100_spi_read(ndev, addr + 1); in w5100_spi_read16()
60 static int w5100_spi_write16(struct net_device *ndev, u32 addr, u16 data) in w5100_spi_write16() argument
64 ret = w5100_spi_write(ndev, addr, data >> 8); in w5100_spi_write16()
68 return w5100_spi_write(ndev, addr + 1, data & 0xff); in w5100_spi_write16()
71 static int w5100_spi_readbulk(struct net_device *ndev, u32 addr, u8 *buf, in w5100_spi_readbulk() argument
77 int ret = w5100_spi_read(ndev, addr + i); in w5100_spi_readbulk()
87 static int w5100_spi_writebulk(struct net_device *ndev, u32 addr, const u8 *buf, in w5100_spi_writebulk() argument
93 int ret = w5100_spi_write(ndev, addr + i, buf[i]); in w5100_spi_writebulk()
139 static int w5200_spi_read(struct net_device *ndev, u32 addr) in w5200_spi_read() argument
142 u8 cmd[4] = { addr >> 8, addr & 0xff, 0, 1 }; in w5200_spi_read()
151 static int w5200_spi_write(struct net_device *ndev, u32 addr, u8 data) in w5200_spi_write() argument
154 u8 cmd[5] = { addr >> 8, addr & 0xff, W5200_SPI_WRITE_OPCODE, 1, data }; in w5200_spi_write()
159 static int w5200_spi_read16(struct net_device *ndev, u32 addr) in w5200_spi_read16() argument
162 u8 cmd[4] = { addr >> 8, addr & 0xff, 0, 2 }; in w5200_spi_read16()
171 static int w5200_spi_write16(struct net_device *ndev, u32 addr, u16 data) in w5200_spi_write16() argument
175 addr >> 8, addr & 0xff, in w5200_spi_write16()
183 static int w5200_spi_readbulk(struct net_device *ndev, u32 addr, u8 *buf, in w5200_spi_readbulk() argument
202 spi_priv->cmd_buf[0] = addr >> 8; in w5200_spi_readbulk()
203 spi_priv->cmd_buf[1] = addr; in w5200_spi_readbulk()
213 static int w5200_spi_writebulk(struct net_device *ndev, u32 addr, const u8 *buf, in w5200_spi_writebulk() argument
232 spi_priv->cmd_buf[0] = addr >> 8; in w5200_spi_writebulk()
233 spi_priv->cmd_buf[1] = addr; in w5200_spi_writebulk()
255 #define W5500_SPI_BLOCK_SELECT(addr) (((addr) >> 16) & 0x1f) argument
256 #define W5500_SPI_READ_CONTROL(addr) (W5500_SPI_BLOCK_SELECT(addr) << 3) argument
257 #define W5500_SPI_WRITE_CONTROL(addr) \ argument
258 ((W5500_SPI_BLOCK_SELECT(addr) << 3) | BIT(2))
284 static int w5500_spi_read(struct net_device *ndev, u32 addr) in w5500_spi_read() argument
288 addr >> 8, in w5500_spi_read()
289 addr, in w5500_spi_read()
290 W5500_SPI_READ_CONTROL(addr) in w5500_spi_read()
300 static int w5500_spi_write(struct net_device *ndev, u32 addr, u8 data) in w5500_spi_write() argument
304 addr >> 8, in w5500_spi_write()
305 addr, in w5500_spi_write()
306 W5500_SPI_WRITE_CONTROL(addr), in w5500_spi_write()
313 static int w5500_spi_read16(struct net_device *ndev, u32 addr) in w5500_spi_read16() argument
317 addr >> 8, in w5500_spi_read16()
318 addr, in w5500_spi_read16()
319 W5500_SPI_READ_CONTROL(addr) in w5500_spi_read16()
329 static int w5500_spi_write16(struct net_device *ndev, u32 addr, u16 data) in w5500_spi_write16() argument
333 addr >> 8, in w5500_spi_write16()
334 addr, in w5500_spi_write16()
335 W5500_SPI_WRITE_CONTROL(addr), in w5500_spi_write16()
343 static int w5500_spi_readbulk(struct net_device *ndev, u32 addr, u8 *buf, in w5500_spi_readbulk() argument
362 spi_priv->cmd_buf[0] = addr >> 8; in w5500_spi_readbulk()
363 spi_priv->cmd_buf[1] = addr; in w5500_spi_readbulk()
364 spi_priv->cmd_buf[2] = W5500_SPI_READ_CONTROL(addr); in w5500_spi_readbulk()
372 static int w5500_spi_writebulk(struct net_device *ndev, u32 addr, const u8 *buf, in w5500_spi_writebulk() argument
391 spi_priv->cmd_buf[0] = addr >> 8; in w5500_spi_writebulk()
392 spi_priv->cmd_buf[1] = addr; in w5500_spi_writebulk()
393 spi_priv->cmd_buf[2] = W5500_SPI_WRITE_CONTROL(addr); in w5500_spi_writebulk()