Home
last modified time | relevance | path

Searched refs:ax_spi (Results 1 – 5 of 5) sorted by relevance

/drivers/net/ethernet/asix/
Dax88796c_spi.c20 int axspi_wakeup(struct axspi_data *ax_spi) in axspi_wakeup() argument
24 ax_spi->cmd_buf[0] = AX_SPICMD_EXIT_PWD; /* OP */ in axspi_wakeup()
25 ret = spi_write(ax_spi->spi, ax_spi->cmd_buf, 1); in axspi_wakeup()
27 dev_err(&ax_spi->spi->dev, "%s() failed: ret = %d\n", __func__, ret); in axspi_wakeup()
31 int axspi_read_status(struct axspi_data *ax_spi, struct spi_status *status) in axspi_read_status() argument
36 ax_spi->cmd_buf[0] = AX_SPICMD_READ_STATUS; in axspi_read_status()
37 ret = spi_write_then_read(ax_spi->spi, ax_spi->cmd_buf, 1, (u8 *)status, 3); in axspi_read_status()
39 dev_err(&ax_spi->spi->dev, "%s() failed: ret = %d\n", __func__, ret); in axspi_read_status()
46 int axspi_read_rxq(struct axspi_data *ax_spi, void *data, int len) in axspi_read_rxq() argument
48 struct spi_transfer *xfer = ax_spi->spi_rx_xfer; in axspi_read_rxq()
[all …]
Dax88796c_spi.h42 int axspi_read_rxq(struct axspi_data *ax_spi, void *data, int len);
43 int axspi_write_txq(const struct axspi_data *ax_spi, void *data, int len);
44 u16 axspi_read_reg(struct axspi_data *ax_spi, u8 reg);
45 int axspi_write_reg(struct axspi_data *ax_spi, u8 reg, u16 value);
46 int axspi_read_status(struct axspi_data *ax_spi, struct spi_status *status);
47 int axspi_wakeup(struct axspi_data *ax_spi);
49 static inline u16 AX_READ(struct axspi_data *ax_spi, u8 offset) in AX_READ() argument
51 return axspi_read_reg(ax_spi, offset); in AX_READ()
54 static inline int AX_WRITE(struct axspi_data *ax_spi, u16 value, u8 offset) in AX_WRITE() argument
56 return axspi_write_reg(ax_spi, offset, value); in AX_WRITE()
[all …]
Dax88796c_main.c46 AX_WRITE(&ax_local->ax_spi, PSR_RESET, P0_PSR); in ax88796c_soft_reset()
47 AX_WRITE(&ax_local->ax_spi, PSR_RESET_CLR, P0_PSR); in ax88796c_soft_reset()
52 &ax_local->ax_spi, P0_PSR); in ax88796c_soft_reset()
56 temp = AX_READ(&ax_local->ax_spi, P4_SPICR); in ax88796c_soft_reset()
58 AX_WRITE(&ax_local->ax_spi, in ax88796c_soft_reset()
60 ax_local->ax_spi.comp = 1; in ax88796c_soft_reset()
62 AX_WRITE(&ax_local->ax_spi, in ax88796c_soft_reset()
64 ax_local->ax_spi.comp = 0; in ax88796c_soft_reset()
76 AX_WRITE(&ax_local->ax_spi, EECR_RELOAD, P3_EECR); in ax88796c_reload_eeprom()
81 &ax_local->ax_spi, P0_PSR); in ax88796c_reload_eeprom()
[all …]
Dax88796c_ioctl.c81 maccr |= AX_READ(&ax_local->ax_spi, P0_MACCR) & in ax88796c_set_pauseparam()
83 AX_WRITE(&ax_local->ax_spi, maccr, P0_MACCR); in ax88796c_set_pauseparam()
109 *p = AX_READ(&ax_local->ax_spi, offset); in ax88796c_get_regs()
177 AX_WRITE(&ax_local->ax_spi, MDIOCR_RADDR(loc) in ax88796c_mdio_read()
183 &ax_local->ax_spi, P2_MDIOCR); in ax88796c_mdio_read()
185 ret = AX_READ(&ax_local->ax_spi, P2_MDIODR); in ax88796c_mdio_read()
199 AX_WRITE(&ax_local->ax_spi, val, P2_MDIODR); in ax88796c_mdio_write()
201 AX_WRITE(&ax_local->ax_spi, in ax88796c_mdio_write()
208 &ax_local->ax_spi, P2_MDIOCR); in ax88796c_mdio_write()
Dax88796c_main.h103 struct axspi_data ax_spi; member