Lines Matching refs:cs
29 unsigned int cs; member
80 void fsl_spi_cs_activate(struct spi_slave *slave, uint cs) in fsl_spi_cs_activate() argument
88 com |= ESPI_COM_CS(cs); in fsl_spi_cs_activate()
173 int espi_xfer(struct fsl_spi_slave *fsl, uint cs, unsigned int bitlen, in espi_xfer() argument
242 fsl_spi_cs_activate(slave, cs); in espi_xfer()
292 void espi_claim_bus(struct fsl_spi_slave *fsl, unsigned int cs) in espi_claim_bus() argument
311 out_be32(&espi->csmode[cs], in_be32(&espi->csmode[cs]) & in espi_claim_bus()
317 out_be32(&espi->csmode[cs], in_be32(&espi->csmode[cs]) in espi_claim_bus()
322 out_be32(&espi->csmode[cs], in_be32(&espi->csmode[cs]) in espi_claim_bus()
325 out_be32(&espi->csmode[cs], in_be32(&espi->csmode[cs]) in espi_claim_bus()
329 out_be32(&espi->csmode[cs], in_be32(&espi->csmode[cs]) in espi_claim_bus()
333 out_be32(&espi->csmode[cs], in_be32(&espi->csmode[cs]) in espi_claim_bus()
376 int spi_cs_is_valid(unsigned int bus, unsigned int cs) in spi_cs_is_valid() argument
378 return bus == 0 && cs < ESPI_MAX_CS_NUM; in spi_cs_is_valid()
381 struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, in spi_setup_slave() argument
386 if (!spi_cs_is_valid(bus, cs)) in spi_setup_slave()
389 fsl = spi_alloc_slave(struct fsl_spi_slave, bus, cs); in spi_setup_slave()
414 espi_claim_bus(fsl, slave->cs); in spi_claim_bus()
431 return espi_xfer(fsl, slave->cs, bitlen, dout, din, flags); in spi_xfer()
439 out_be32(&fsl->espi->csmode[fsl->cs], in __espi_set_speed()
440 in_be32(&fsl->espi->csmode[fsl->cs]) in __espi_set_speed()
448 out_be32(&fsl->espi->csmode[fsl->cs], in __espi_set_mode()
449 in_be32(&fsl->espi->csmode[fsl->cs]) in __espi_set_mode()
452 out_be32(&fsl->espi->csmode[fsl->cs], in __espi_set_mode()
453 in_be32(&fsl->espi->csmode[fsl->cs]) in __espi_set_mode()
462 espi_claim_bus(fsl, fsl->cs); in fsl_espi_claim_bus()
483 return espi_xfer(fsl, fsl->cs, bitlen, dout, din, flags); in fsl_espi_xfer()
516 debug("%s cs %u\n", __func__, slave_plat->cs); in fsl_espi_child_pre_probe()
517 fsl->cs = slave_plat->cs; in fsl_espi_child_pre_probe()