Current-Users archive

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

Re: mistake the i2c_bitbang direction



Hi! tsutsui-san,


From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
Date: Wed, 9 Jul 2008 03:48:46 +0900

> > I think that the following correction is necessary for gpiic of 405Gp
> > of imb4xx if his correction is correct.
> 
> It looks OPB I2C hardware is implemented properly and
> it doesn't require DIR() ops at all, but it might still be
> better to have compatibility with other implementation
> which will hold SDA output value set during DIR() is INPUT.
> (I'm not sure how the DIR() op was defined and designed though)
> 
> ---
> 
> Index: arch/powerpc/ibm4xx/dev/gpiic_opb.c
> ===================================================================
> RCS file: /cvsroot/src/sys/arch/powerpc/ibm4xx/dev/gpiic_opb.c,v
> retrieving revision 1.5
> diff -u -r1.5 gpiic_opb.c
> --- arch/powerpc/ibm4xx/dev/gpiic_opb.c       6 Dec 2007 17:00:33 -0000       
> 1.5
> +++ arch/powerpc/ibm4xx/dev/gpiic_opb.c       8 Jul 2008 17:55:52 -0000
> @@ -55,6 +55,7 @@

.. snip ..

>       rv = bus_space_read_1(sc->sc_bust, sc->sc_bush, IIC_DIRECTCNTL) << 2;
>       rv &= (IIC_DIRECTCNTL_SCC | IIC_DIRECTCNTL_SDAC);


I tested your patch.  looks good ;-)
Shall you commit this patch?


Other ibm4xx guys has other idea?
--
kiyohara


Home | Main Index | Thread Index | Old Index