linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Hurst <jhurst2@austin.rr.com>
To: linuxppc-embedded@lists.linuxppc.org
Subject: Re: testing i2c on mpc8xx
Date: Sun, 29 Jun 2003 01:51:54 -0500	[thread overview]
Message-ID: <3EFE8C8A.70508@austin.rr.com> (raw)
In-Reply-To: 3EFC5D10.9000701@peak.uklinux.net


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/

           reply	other threads:[~2003-06-29  6:51 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <3EFC5D10.9000701@peak.uklinux.net>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EFE8C8A.70508@austin.rr.com \
    --to=jhurst2@austin.rr.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).