From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Mon, 29 Jul 2013 10:12:31 -0600 Subject: [U-Boot] [PATCH v3 8/9] tegra: i2c: Enable new CONFIG_SYS_I2C framework In-Reply-To: <1367668903-29653-9-git-send-email-hs@denx.de> References: <1367668903-29653-1-git-send-email-hs@denx.de> <1367668903-29653-9-git-send-email-hs@denx.de> Message-ID: <51F6946F.8010500@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 05/04/2013 06:01 AM, Heiko Schocher wrote: > From: Simon Glass > > 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.