Lines Matching refs:cfslave

105 	struct cf_spi_slave *cfslave = to_cf_spi_slave(slave);  in cfspi_xfer()  local
111 if (cfslave->charbit == 16) { in cfspi_xfer()
129 if (cfslave->charbit == 16) in cfspi_xfer()
138 if (cfslave->charbit == 16) in cfspi_xfer()
153 if (cfslave->charbit == 16) in cfspi_xfer()
162 if (cfslave->charbit == 16) in cfspi_xfer()
176 static struct spi_slave *cfspi_setup_slave(struct cf_spi_slave *cfslave, in cfspi_setup_slave() argument
206 if ((cfslave->baudrate > (gd->bus_clk >> 1)) || in cfspi_setup_slave()
207 (cfslave->baudrate < (gd->bus_clk / tmp))) { in cfspi_setup_slave()
215 (cfslave->baudrate > (gd->bus_clk / (prescaler[0] * scaler[0])))) { in cfspi_setup_slave()
232 dspi->ctar[cfslave->slave.bus] & 0x78000000; in cfspi_setup_slave()
247 bus_setup |= (dspi->ctar[cfslave->slave.bus] & 0x78FCFFF0); in cfspi_setup_slave()
249 cfslave->charbit = in cfspi_setup_slave()
250 ((dspi->ctar[cfslave->slave.bus] & 0x78000000) == in cfspi_setup_slave()
262 if (tmp > cfslave->baudrate) in cfspi_setup_slave()
263 diff = tmp - cfslave->baudrate; in cfspi_setup_slave()
265 diff = cfslave->baudrate - tmp; in cfspi_setup_slave()
275 dspi->ctar[cfslave->slave.bus] = bus_setup; in cfspi_setup_slave()
277 return &cfslave->slave; in cfspi_setup_slave()
298 struct cf_spi_slave *cfslave; in spi_setup_slave() local
303 cfslave = spi_alloc_slave(struct cf_spi_slave, bus, cs); in spi_setup_slave()
304 if (!cfslave) in spi_setup_slave()
307 cfslave->baudrate = max_hz; in spi_setup_slave()
310 return cfspi_setup_slave(cfslave, mode); in spi_setup_slave()
315 struct cf_spi_slave *cfslave = to_cf_spi_slave(slave); in spi_free_slave() local
317 free(cfslave); in spi_free_slave()