Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/ic



On Wed, Mar 31, 2010 at 05:09:41AM +0000, Michael Lorenz wrote:
> Module Name:  src
> Committed By: macallan
> Date:         Wed Mar 31 05:09:41 UTC 2010
> 
> Modified Files:
>       src/sys/dev/ic: pcf8584.c
> 
> Log Message:
> Do as OpenSolaris does and read the status register after each write.
> Now this driver works on my Blade 2500.

 void
 pcfiic_write(struct pcfiic_softc *sc, bus_size_t r, u_int8_t v)
 {
+       volatile uint8_t junk;
        bus_space_write_1(sc->sc_iot, sc->sc_ioh, sc->sc_regmap[r], v);
+       junk = bus_space_read_1(sc->sc_iot, sc->sc_ioh, PCF_S1);
        bus_space_barrier(sc->sc_iot, sc->sc_ioh, sc->sc_regmap[r], 1,
            BUS_SPACE_BARRIER_WRITE);
 }

I wonder, does the device need the read, or is the bus_space_barrier()
insufficient to flush the write to the device?

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933


Home | Main Index | Thread Index | Old Index