From mboxrd@z Thu Jan 1 00:00:00 1970 From: Baruch Siach Date: Tue, 09 Apr 2019 20:40:12 +0300 Subject: [U-Boot] [PATCH] i2c: mvtwsi: fix hang on SPL bind In-Reply-To: References: <36f318cdb03310733282e76aad5594dc35da98ac.1554629438.git.baruch@tkos.co.il> Message-ID: <87mukzhybn.fsf@tarshish> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefan, On Tue, Apr 09 2019, Stefan Roese wrote: > On 07.04.19 11:30, Baruch Siach wrote: >> The mvebu specific debug register is not accessible when the bind code >> runs in SPL. Skip it. > > The other I2C registers can be accessed but only the debug register > not? Do you know, why this is the case? Access to other registers might hang as well, I have not tested. The debug register is the only one that the .bind callback touches. .bind callbacks are called before board_early_init_f() that configures the MPP. baruch >> Signed-off-by: Baruch Siach >> --- >> drivers/i2c/mvtwsi.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c >> index 74ac0a4aa789..05560e112729 100644 >> --- a/drivers/i2c/mvtwsi.c >> +++ b/drivers/i2c/mvtwsi.c >> @@ -801,6 +801,10 @@ static int mvtwsi_i2c_ofdata_to_platdata(struct udevice *bus) >> static void twsi_disable_i2c_slave(struct mvtwsi_registers *twsi) >> { >> + /* The debug register is not accessible in early boot */ >> + if (IS_ENABLED(CONFIG_SPL_BUILD)) >> + return; >> + >> clrbits_le32(&twsi->debug, BIT(18)); >> } -- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -