Lines Matching +full:clkdiv +full:- +full:-

14 #include "spi-cavium.h"
24 mpi_sts.u64 = readq(p->register_base + OCTEON_SPI_STS(p)); in octeon_spi_wait_ready()
33 struct spi_device *spi = msg->spi; in octeon_spi_do_transfer()
36 unsigned int clkdiv; in octeon_spi_do_transfer() local
44 mode = spi->mode; in octeon_spi_do_transfer()
48 clkdiv = p->sys_freq / (2 * xfer->speed_hz); in octeon_spi_do_transfer()
52 mpi_cfg.s.clkdiv = clkdiv; in octeon_spi_do_transfer()
61 p->cs_enax |= 1ull << (12 + spi_get_chipselect(spi, 0)); in octeon_spi_do_transfer()
62 mpi_cfg.u64 |= p->cs_enax; in octeon_spi_do_transfer()
64 if (mpi_cfg.u64 != p->last_cfg) { in octeon_spi_do_transfer()
65 p->last_cfg = mpi_cfg.u64; in octeon_spi_do_transfer()
66 writeq(mpi_cfg.u64, p->register_base + OCTEON_SPI_CFG(p)); in octeon_spi_do_transfer()
68 tx_buf = xfer->tx_buf; in octeon_spi_do_transfer()
69 rx_buf = xfer->rx_buf; in octeon_spi_do_transfer()
70 len = xfer->len; in octeon_spi_do_transfer()
78 writeq(d, p->register_base + OCTEON_SPI_DAT0(p) + (8 * i)); in octeon_spi_do_transfer()
85 writeq(mpi_tx.u64, p->register_base + OCTEON_SPI_TX(p)); in octeon_spi_do_transfer()
90 u64 v = readq(p->register_base + OCTEON_SPI_DAT0(p) + (8 * i)); in octeon_spi_do_transfer()
93 len -= OCTEON_SPI_MAX_BYTES; in octeon_spi_do_transfer()
102 writeq(d, p->register_base + OCTEON_SPI_DAT0(p) + (8 * i)); in octeon_spi_do_transfer()
108 mpi_tx.s.leavecs = xfer->cs_change; in octeon_spi_do_transfer()
110 mpi_tx.s.leavecs = !xfer->cs_change; in octeon_spi_do_transfer()
113 writeq(mpi_tx.u64, p->register_base + OCTEON_SPI_TX(p)); in octeon_spi_do_transfer()
118 u64 v = readq(p->register_base + OCTEON_SPI_DAT0(p) + (8 * i)); in octeon_spi_do_transfer()
124 return xfer->len; in octeon_spi_do_transfer()
135 list_for_each_entry(xfer, &msg->transfers, transfer_list) { in octeon_spi_transfer_one_message()
136 bool last_xfer = list_is_last(&xfer->transfer_list, in octeon_spi_transfer_one_message()
137 &msg->transfers); in octeon_spi_transfer_one_message()
146 msg->status = status; in octeon_spi_transfer_one_message()
147 msg->actual_length = total_len; in octeon_spi_transfer_one_message()