All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <stefan.roese@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] PPC4XX Custom Board - Failing to read I2C
Date: Mon, 08 Apr 2013 16:34:28 +0200	[thread overview]
Message-ID: <5162D574.30702@gmail.com> (raw)
In-Reply-To: <1365430593610-151814.post@n7.nabble.com>

Greg,

On 08.04.2013 16:16, txcotrader wrote:
> Thanks for the suggestion, I2C_BASE_ADDR is the same in both versions. After
> doing some more digging, I can see why v2013.01.01 is not passing
> i2c_transfer. The following routine yields different results in the 2
> versions:
> 
> v2013.01.01-
>    do {
>             /* Get status */
>             status = in_8(&i2c->sts);
>             printf("gd_ do status->i = %x, status = %d, IIC_STS = %x\n", i,
> status, &i2c->sts);
>             udelay(10);
>             i--;
>         } while ((status & IIC_STS_PT) && !(status & IIC_STS_ERR) &&
>              (i > 0));
> 
> Result: gd_ do status->i = 80, status = 4, IIC_STS = ef600408
> 
> v1.7.02-
>    do {
>             /* Get status */
>             status = in_8((u8 *)IIC_STS);
>             printf("gd_ do status->i = %d, status = %d, IIC_STS = %x\n", i,
> status, IIC_STS);
>             udelay(10);
>             i--;
>         } while ((status & IIC_STS_PT) && !(status & IIC_STS_ERR) && (i >
> 0));
> 
> Result: gd_ do status->i = 80, status = 40, IIC_STS = ef600408
> 
> So in v2013.01.01 (status & IIC_STS_ERR) == 1, versus a (status &
> IIC_STS_ERR) == 0 in v1.7.02. Am I missing some sort of offset config
> someplace? Once again, any help is greatly appreciated.

So look into the manual to check what exactly these IIC_STS
bits/differences mean. 0x4 versus 0x40. This might give you a hint.
Perhaps some clocks missing? Not sure.

Which PPC4xx variant are you using again? 460SX?

Thanks,
Stefan

  reply	other threads:[~2013-04-08 14:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-02 21:48 [U-Boot] PPC4XX Custom Board - Failing to read I2C txcotrader
2013-04-03  0:51 ` Stefan Roese
2013-04-03 16:15   ` txcotrader
2013-04-03 17:08     ` Stefan Roese
2013-04-03 17:29       ` txcotrader
2013-04-03 17:54         ` Anatolij Gustschin
2013-04-03 19:09           ` txcotrader
2013-04-04 17:43             ` txcotrader
2013-04-04 22:18             ` Rommel Custodio
2013-04-04 22:26               ` txcotrader
2013-04-05  0:04 ` txcotrader
2013-04-05  6:04   ` Stefan Roese
2013-04-08 12:26     ` txcotrader
2013-04-08 13:33       ` Stefan Roese
2013-04-08 14:16     ` txcotrader
2013-04-08 14:34       ` Stefan Roese [this message]
2013-04-08 19:54         ` txcotrader
2013-04-09 15:49           ` Stefan Roese
2013-07-24 22:58             ` txcotrader
2013-07-25  4:33               ` Stefan Roese

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=5162D574.30702@gmail.com \
    --to=stefan.roese@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.