Jonathan Gray <[email protected]> wrote: > The SpacemiT documentation for ICR IUE has: > "Software must ensure the I2C bus is idle before setting this bit." > > which is ISR IBB > "I2C Bus Busy.0 = I2C bus is idle" > > untested as I don't have the hardware > > Index: sys/arch/riscv64/dev/smtiic.c > =================================================================== > RCS file: /cvs/src/sys/arch/riscv64/dev/smtiic.c,v > diff -u -p -r1.1 smtiic.c > --- sys/arch/riscv64/dev/smtiic.c 6 Apr 2026 10:30:27 -0000 1.1 > +++ sys/arch/riscv64/dev/smtiic.c 11 Sep 2026 13:30:06 -0000 > @@ -186,6 +186,9 @@ smtiic_i2c_acquire_bus(void *cookie, int > { > struct smtiic_softc *sc = cookie; > > + if (smtiic_wait_state(sc, ISR_IBB, 0)) > + return EIO; > + > HSET4(sc, ICR, ICR_IUE); > return 0; > } >
Oooh I suspect that's going to be the winner.
