From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] i2c_set_bus_num freeze
Date: Fri, 27 Jan 2017 07:46:05 +0100 [thread overview]
Message-ID: <588AECAD.20009@denx.de> (raw)
In-Reply-To: <CAJ2oMhKDk8BZjOBn=Mtamezccx8qOA3mvGCARBc=8-z3jQE1Cw@mail.gmail.com>
Hello Ran,
Am 26.01.2017 um 18:42 schrieb Ran Shalit:
> Hello,
>
> I have some issue in u-boot trying to access bus #1.
On which hardware? Is the board in mainline?
> I can access bus #0, #2 with i2c dev 0/2
>
> I can also access bus #0,1,2 from linux.
>
> But on trying to access i2c #1 in u-boot in hangs:
>
> The function i2c_set_bus_num get stuck .
>
>
> ret = i2c_set_bus_num(1);
>
> <<------- never gets here .........
> if (ret)
> printf("Failure changing bus number (%d)\n", ret);
>
> It hangs in i2c_set_bus_num->i2c_init->
>
> ......
>
> printf("i2c_init 8\n");
You see this printf?
> bus_initialized[current_bus] = 1;
> if (readw (I2C_CON) & I2C_CON_EN) {
> writew (0, I2C_CON);
> udelay (50000);
> }
>
> writew(psc, I2C_PSC);
> writew(scll, I2C_SCLL);
> writew(sclh, I2C_SCLH);
>
> /* own address */
> writew (slaveadd, I2C_OA);
> writew (I2C_CON_EN, I2C_CON);
>
> printf("i2c_init 9\n"); <<------ never get printed ..................
>
> I have seen a similar question, yet I am doing this access after u-boot
> complete, and command prompt.
>
> Is anyone familiar with this ?
Hmm.. no reason, why the last printf should not come ...
As I do not know, on which hw ... I just can speculate ...
Is the clock for the i2c subsystem 1 in the SoC enabled?
bye,
Heiko
>
> Regards,
>
> Ran
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2017-01-27 6:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-26 17:42 [U-Boot] i2c_set_bus_num freeze Ran Shalit
2017-01-26 23:20 ` Adam Ford
2017-01-27 5:30 ` Ran Shalit
2017-01-27 6:46 ` Heiko Schocher [this message]
2017-01-27 7:08 ` Ran Shalit
2017-01-27 7:12 ` Ran Shalit
2017-01-27 7:16 ` Michael Nazzareno Trimarchi
2017-01-27 7:24 ` Heiko Schocher
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=588AECAD.20009@denx.de \
--to=hs@denx.de \
--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.