-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, On Mar 31, 2010, at 10:45 AM, David Young wrote:
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?
I thave no idea. It works without the read on some machines - might be a quirk in the Blade 2500's hardware. Either way we can probably get rid of the bus_space_barrier().
have fun Michael -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iQEVAwUBS7OOX8pnzkX8Yg2nAQIfgwgAmhqpCkhfn5XBZ9bvj2ycADxjBVGg/7Cb TGSOLhJ9lizzNZHYh9V2Vtwf3tRgLRS4xLrA6T/UyT5fO+t+uTWzCF77P30LIxrx faoEPxrOwehxF0inVK/aaxjbOiiAN7zMBMwswC7dJOtG6m6pdpOMAo3mHU4zXWq4 7nFRcrdy1eOc/fGvxuwgnDPvf7CyriMKRMkO7m8QQCKnG4C1XDQ5VJYkLorPKqZm UEwYl/JhQz1LdTJ6l8SUxAzoCprT7du/iaZvxOHdAsRNtPRhA1pc7E/fFOJg9e3M 1+GXWcY/8SUTTNhUNEreTGPycM6nf6AhjusBFZYeK9Q/lxSF0KI6WQ== =gpun -----END PGP SIGNATURE-----