Lines Matching refs:cr

189 motoi2c_busy_wait(struct motoi2c_softc *sc, uint8_t cr)  in motoi2c_busy_wait()  argument
207 if ((cr & CR_MTX) && (sr & SR_RXAK)) { in motoi2c_busy_wait()
234 uint8_t cr; in motoi2c_exec() local
238 cr = I2C_READ(I2CCR); in motoi2c_exec()
243 sr, cr)); in motoi2c_exec()
246 if ((cr & CR_MSTA) == 0 && (sr & SR_MBB) != 0) { in motoi2c_exec()
260 cr = sc->sc_enable_mask | CR_MTX | CR_MSTA; in motoi2c_exec()
261 I2C_WRITE(I2CCR, cr); in motoi2c_exec()
264 __func__, I2C_READ(I2CSR), cr, I2C_READ(I2CCR))); in motoi2c_exec()
269 __func__, I2C_READ(I2CSR), cr, I2C_READ(I2CCR))); in motoi2c_exec()
280 __func__, I2C_READ(I2CSR), cr, I2C_READ(I2CCR))); in motoi2c_exec()
288 error = motoi2c_busy_wait(sc, cr); in motoi2c_exec()
300 error = motoi2c_busy_wait(sc, cr); in motoi2c_exec()
303 " %d\n", __func__, i, I2C_READ(I2CCR), cr, error)); in motoi2c_exec()
309 KASSERT(cr & CR_MTX); in motoi2c_exec()
310 KASSERT((cr & CR_TXAK) == 0); in motoi2c_exec()
311 I2C_WRITE(I2CCR, cr | CR_RSTA); in motoi2c_exec()
314 __func__, I2C_READ(I2CSR), cr | CR_RSTA, I2C_READ(I2CCR))); in motoi2c_exec()
321 error = motoi2c_busy_wait(sc, cr); in motoi2c_exec()
331 cr &= ~CR_MTX; /* clear transmit flags */ in motoi2c_exec()
333 cr |= CR_TXAK; in motoi2c_exec()
334 I2C_WRITE(I2CCR, cr); in motoi2c_exec()
345 error = motoi2c_busy_wait(sc, cr); in motoi2c_exec()
352 cr |= CR_TXAK; in motoi2c_exec()
353 I2C_WRITE(I2CCR, cr); in motoi2c_exec()
355 cr = sc->sc_enable_mask | CR_TXAK; in motoi2c_exec()
356 I2C_WRITE(I2CCR, cr); in motoi2c_exec()
362 cr = sc->sc_enable_mask | CR_TXAK; in motoi2c_exec()
363 I2C_WRITE(I2CCR, cr); in motoi2c_exec()
366 error = motoi2c_busy_wait(sc, cr); in motoi2c_exec()
377 error = motoi2c_busy_wait(sc, cr); in motoi2c_exec()
391 if (error || (cr & CR_TXAK) || ((cr & CR_MSTA) && I2C_OP_STOP_P(op))) { in motoi2c_exec()
392 cr = sc->sc_enable_mask; in motoi2c_exec()
393 I2C_WRITE(I2CCR, cr); in motoi2c_exec()
396 cr, I2C_READ(I2CCR))); in motoi2c_exec()