From: Baruch Siach <baruch@tkos.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] i2c: mvtwsi: fix hang on SPL bind
Date: Tue, 09 Apr 2019 20:40:12 +0300 [thread overview]
Message-ID: <87mukzhybn.fsf@tarshish> (raw)
In-Reply-To: <f04aa449-7cc0-eb7e-293c-88db6a9aca7c@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 <baruch@tkos.co.il>
>> ---
>> 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 -
next prev parent reply other threads:[~2019-04-09 17:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-07 9:30 [U-Boot] [PATCH] i2c: mvtwsi: fix hang on SPL bind Baruch Siach
2019-04-09 15:18 ` Stefan Roese
2019-04-09 17:40 ` Baruch Siach [this message]
2019-04-10 5:38 ` Heiko Schocher
2019-04-11 9:31 ` Stefan Roese
2019-04-11 9:49 ` Heiko Schocher
2019-04-11 12:01 ` Tom Rini
2019-04-11 13:27 ` 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=87mukzhybn.fsf@tarshish \
--to=baruch@tkos.co.il \
--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.