Searched refs:xspi (Results 1 – 4 of 4) sorted by relevance
/drivers/spi/ |
D | spi-xilinx.c | 116 static void xilinx_spi_tx(struct xilinx_spi *xspi) in xilinx_spi_tx() argument 120 if (!xspi->tx_ptr) { in xilinx_spi_tx() 121 xspi->write_fn(0, xspi->regs + XSPI_TXD_OFFSET); in xilinx_spi_tx() 125 switch (xspi->bytes_per_word) { in xilinx_spi_tx() 127 data = *(u8 *)(xspi->tx_ptr); in xilinx_spi_tx() 130 data = *(u16 *)(xspi->tx_ptr); in xilinx_spi_tx() 133 data = *(u32 *)(xspi->tx_ptr); in xilinx_spi_tx() 137 xspi->write_fn(data, xspi->regs + XSPI_TXD_OFFSET); in xilinx_spi_tx() 138 xspi->tx_ptr += xspi->bytes_per_word; in xilinx_spi_tx() 141 static void xilinx_spi_rx(struct xilinx_spi *xspi) in xilinx_spi_rx() argument [all …]
|
D | spi-cadence.c | 129 static inline u32 cdns_spi_read(struct cdns_spi *xspi, u32 offset) in cdns_spi_read() argument 131 return readl_relaxed(xspi->regs + offset); in cdns_spi_read() 134 static inline void cdns_spi_write(struct cdns_spi *xspi, u32 offset, u32 val) in cdns_spi_write() argument 136 writel_relaxed(val, xspi->regs + offset); in cdns_spi_write() 150 static void cdns_spi_init_hw(struct cdns_spi *xspi) in cdns_spi_init_hw() argument 154 if (xspi->is_decoded_cs) in cdns_spi_init_hw() 157 cdns_spi_write(xspi, CDNS_SPI_ER, CDNS_SPI_ER_DISABLE); in cdns_spi_init_hw() 158 cdns_spi_write(xspi, CDNS_SPI_IDR, CDNS_SPI_IXR_ALL); in cdns_spi_init_hw() 161 while (cdns_spi_read(xspi, CDNS_SPI_ISR) & CDNS_SPI_IXR_RXNEMTY) in cdns_spi_init_hw() 162 cdns_spi_read(xspi, CDNS_SPI_RXD); in cdns_spi_init_hw() [all …]
|
D | spi-xlp.c | 126 static void xlp_spi_sysctl_setup(struct xlp_spi_priv *xspi) in xlp_spi_sysctl_setup() argument 131 xlp_spi_sysctl_write(xspi, XLP_SPI_SYSCTRL, in xlp_spi_sysctl_setup() 133 xlp_spi_sysctl_write(xspi, XLP_SPI_SYSCTRL, XLP_SPI_SYS_PMEN); in xlp_spi_sysctl_setup() 138 struct xlp_spi_priv *xspi; in xlp_spi_setup() local 142 xspi = spi_master_get_devdata(spi->master); in xlp_spi_setup() 147 fdiv = DIV_ROUND_UP(xspi->spi_clk, spi->max_speed_hz); in xlp_spi_setup() 153 xlp_spi_reg_write(xspi, cs, XLP_SPI_FDIV, fdiv); in xlp_spi_setup() 154 xlp_spi_reg_write(xspi, cs, XLP_SPI_FIFO_THRESH, XLP_SPI_TXRXTH); in xlp_spi_setup() 155 cfg = xlp_spi_reg_read(xspi, cs, XLP_SPI_CONFIG); in xlp_spi_setup() 176 xlp_spi_reg_write(xspi, cs, XLP_SPI_CONFIG, cfg); in xlp_spi_setup() [all …]
|
D | spi-xtensa-xtfpga.c | 43 static inline void xtfpga_spi_wait_busy(struct xtfpga_spi *xspi) in xtfpga_spi_wait_busy() argument 47 for (i = 0; xtfpga_spi_read32(xspi, XTFPGA_SPI_BUSY) && in xtfpga_spi_wait_busy() 56 struct xtfpga_spi *xspi = spi_master_get_devdata(spi->master); in xtfpga_spi_txrx_word() local 58 xspi->data = (xspi->data << bits) | (v & GENMASK(bits - 1, 0)); in xtfpga_spi_txrx_word() 59 xspi->data_sz += bits; in xtfpga_spi_txrx_word() 60 if (xspi->data_sz >= 16) { in xtfpga_spi_txrx_word() 61 xtfpga_spi_write32(xspi, XTFPGA_SPI_DATA, in xtfpga_spi_txrx_word() 62 xspi->data >> (xspi->data_sz - 16)); in xtfpga_spi_txrx_word() 63 xspi->data_sz -= 16; in xtfpga_spi_txrx_word() 64 xtfpga_spi_write32(xspi, XTFPGA_SPI_START, 1); in xtfpga_spi_txrx_word() [all …]
|