[U-Boot] [PATCH v3 8/9] tegra: i2c: Enable new CONFIG_SYS_I2C framework

Stephen Warren swarren at wwwdotorg.org
Mon Jul 29 18:12:31 CEST 2013


On 05/04/2013 06:01 AM, Heiko Schocher wrote:
> From: Simon Glass <sjg at chromium.org>
> 
> This enables CONFIG_SYS_I2C on Tegra, updating existing boards and the Tegra
> i2c driver to support this.

Heiko, the latest U-Boot tree hangs during boot on Tegra, and "git
bisect" points at this patch. Olof reported the issue to me.

Can you take a look at the code and see what might be wrong? Thanks.

I suspect some kind of initialization ordering issue, since the boot
messages are:

-----
U-Boot SPL 2013.07-rc3-00038-g880540d (Jul 29 2013 - 10:04:37)
U-Boot 2013.07-rc3-00038-g880540d (Jul 29 2013 - 10:04:37)

TEGRA30
Board: NVIDIA Beaver
I2C:   Caller requested bad clock: periph=-49, parent=2
-----

... and that "bad clock" message implies to me that the I2C driver is
initializing before it has parsed the correct clock ID out of device tree.

Some later commit causes the hang to happen right after printing "I2C:",
without printing the "bad clock" message. I didn't investigate that,
since I'm assuming the root-cause is the same. Most likely some later
commit causes the uninitialized data to be a valid clock, yet not the
actual I2C clock, so the I2C clock still isn't turned on, and touching
HW (i.e. reading/writing the I2C registers) without a running clock on
Tegra caused hard hangs.


More information about the U-Boot mailing list