Lines Matching full:espi

3  * eSPI controller driver.
17 ccsr_espi_t *espi; member
81 fsl->espi = (void *)(CONFIG_SYS_MPC85xx_ESPI_ADDR); in spi_setup_slave()
85 /* Set eSPI BRG clock source */ in spi_setup_slave()
108 /* set tx_timeout to 10 times of one espi FIFO entry go out */ in spi_setup_slave()
124 ccsr_espi_t *espi = fsl->espi; in spi_claim_bus() local
133 /* Enable eSPI interface */ in spi_claim_bus()
134 out_be32(&espi->mode, ESPI_MODE_RXTHR(3) in spi_claim_bus()
137 out_be32(&espi->event, 0xffffffff); /* Clear all eSPI events */ in spi_claim_bus()
138 out_be32(&espi->mask, 0x00000000); /* Mask all eSPI interrupts */ in spi_claim_bus()
142 out_be32(&espi->csmode[i], ESPI_CSMODE_INIT_VAL); in spi_claim_bus()
144 out_be32(&espi->csmode[cs], in_be32(&espi->csmode[cs]) & in spi_claim_bus()
149 /* Set eSPI BRG clock source */ in spi_claim_bus()
150 out_be32(&espi->csmode[cs], in_be32(&espi->csmode[cs]) in spi_claim_bus()
153 /* Set eSPI mode */ in spi_claim_bus()
155 out_be32(&espi->csmode[cs], in_be32(&espi->csmode[cs]) in spi_claim_bus()
158 out_be32(&espi->csmode[cs], in_be32(&espi->csmode[cs]) in spi_claim_bus()
162 out_be32(&espi->csmode[cs], in_be32(&espi->csmode[cs]) in spi_claim_bus()
166 out_be32(&espi->csmode[cs], in_be32(&espi->csmode[cs]) in spi_claim_bus()
179 ccsr_espi_t *espi = fsl->espi; in fsl_espi_tx() local
188 out_be32(&espi->tx, tmpdout); in fsl_espi_tx()
189 out_be32(&espi->event, ESPI_EV_TNF); in fsl_espi_tx()
193 /* Wait for eSPI transmit to go out */ in fsl_espi_tx()
195 event = in_be32(&espi->event); in fsl_espi_tx()
197 out_be32(&espi->event, ESPI_EV_TXE); in fsl_espi_tx()
209 ccsr_espi_t *espi = fsl->espi; in fsl_espi_rx() local
224 tmpdin = in_be32(&espi->rx); in fsl_espi_rx()
234 out_be32(&espi->event, ESPI_EV_RNE); in fsl_espi_rx()
243 ccsr_espi_t *espi = fsl->espi; in spi_xfer() local
309 /* Clear all eSPI events */ in spi_xfer()
310 out_be32(&espi->event , 0xffffffff); in spi_xfer()
313 event = in_be32(&espi->event); in spi_xfer()
323 event = in_be32(&espi->event); in spi_xfer()
365 ccsr_espi_t *espi = fsl->espi; in spi_cs_activate() local
372 out_be32(&espi->com, com); in spi_cs_activate()
378 ccsr_espi_t *espi = fsl->espi; in spi_cs_deactivate() local
381 out_be32(&espi->mode, in_be32(&espi->mode) & (~ESPI_MODE_EN)); in spi_cs_deactivate()
382 out_be32(&espi->mode, in_be32(&espi->mode) | ESPI_MODE_EN); in spi_cs_deactivate()