linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: testing i2c on mpc8xx
       [not found] ` <3EFC5D10.9000701@peak.uklinux.net>
@ 2003-06-29  6:51   ` Jeff Hurst
  0 siblings, 0 replies; only message in thread
From: Jeff Hurst @ 2003-06-29  6:51 UTC (permalink / raw)
  To: linuxppc-embedded


Seb James wrote:

> I am getting no activity on the i2c clock and data lines, and when
> I try to write to the i2c bus, the processor times out waiting for
> an interrupt associated with (I think) acknowledgement bits coming
> from the slave device to which it is trying to transmit. It times out
> at the following bit of code in cpm_iic_read() (and also does so in
> cpm_iic_write()):

<snip>

> I have tried changing the following line in i2c-algo-8xx.c (line 42 I
> think):
>
> int cpm_scan = 0;
>
> to
>
> int cpm_scan = 1;
>
> Which causes i2c_8xx_add_bus() to scan for devices, using this code:
>
>    /* scan bus */
>    if (cpm_scan) {
>        printk(KERN_INFO " i2c-algo-8xx.o: scanning bus %s...\n",
>               adap->name);
>        for (i = 0; i < 128; i++) {
>            if (cpm_iic_tryaddress(cpm_adap, i)) {
>                printk("(%02x)",i<<1);
>            }
>        }
>        printk("\n");
>    }
>
> This causes the processor to hang in the same way as I described above
> for cpm_xfer.

<insert the doctor joke here>

I had a similar experience.  Decided that it is not a good idea to
scan the bus from the device driver startup function.
I am still curious about the real cause.

--
Jeff Hurst

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-06-29  6:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20030627142900.A12BBC592A@atlas.denx.de>
     [not found] ` <3EFC5D10.9000701@peak.uklinux.net>
2003-06-29  6:51   ` testing i2c on mpc8xx Jeff Hurst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).