public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lokesh Vutla <lokeshvutla@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2] arm: omap: i2c: don't zero cnt in i2c_write
Date: Tue, 3 Dec 2013 09:32:46 +0530	[thread overview]
Message-ID: <529D57E6.1070401@ti.com> (raw)
In-Reply-To: <529CAB7C.8070200@mm-sol.com>

Hi Lubomir,
On Monday 02 December 2013 09:17 PM, Lubomir Popov wrote:
> Hi Nikita,
> 
> On 28/11/13 18:04, Nikita Kiryanov wrote:
>> Writing zero into I2Ci.I2C_CNT register causes random I2C failures in OMAP3
>> based devices. This seems to be related to the following advisory which
>> apears in multiple erratas for OMAP3 SoCs (OMAP35xx, DM37xx), as well as
>> OMAP4430 TRM:
>>
>> Advisory:
>> I2C Module Does Not Allow 0-Byte Data Requests
>> Details:
>> When configured as the master, the I2C module does not allow 0-byte data
>> transfers. Note: Programming I2Ci.I2C_CNT[15:0]: DCOUNT = 0 will cause
>> undefined behavior.
>> Workaround(s):
>> No workaround. Do not use 0-byte data requests.
>>
>> The writes in question are unnecessary from a functional point of view.
>> Most of them are done after I/O has finished, and the only one that preceds
>> I/O (in i2c_probe()) is also unnecessary because a stop bit is sent before
>> actual data transmission takes place.
>>
>> Therefore, remove all writes that zero the cnt register.
>>
>> Cc: Heiko Schocher <hs@denx.de>
>> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>> Cc: Tom Rini <trini@ti.com>
>> Cc: Lubomir Popov <lpopov@mm-sol.com>
>> Cc: Enric Balletbo Serra <eballetbo@gmail.com>
>> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
>> ---
>> Changes in V2:   
>>     Removed all instances of writew(0, &i2c_base->cnt) instead of just the
>>     one in i2c_write (following a test of V1 by Thomas Petazzoni).
>>
>>
> Tested-by: Lubomir Popov <lpopov@mm-sol.com>
> 
> In addition to the OMAP5430/32 tests performed last week, tested today
> on OMAP4 (4430/60/70) and on AM3359. Thus tests have covered OMAP4/5-
> compatible I2C IPs with revnb_lo=[0x000a to 0x000c] (revnb_hi is 0x5040
> for all those IPs).
May I know on top of which tree,tag you are trying this patch ?
I tried OMAP4 on top of v2014.01-rc1, but I am not able to boot. I applied this patch and still
not able to boot. There is a mail thread going on, on this topic.
So I just wanted to know that I am not missing very obvious. 

Thanks and regards,
Lokesh
> 

  reply	other threads:[~2013-12-03  4:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-27 14:44 [U-Boot] [PATCH] arm: omap3: i2c: don't zero cnt in i2c_write Nikita Kiryanov
2013-11-27 15:09 ` Tom Rini
2013-11-27 16:11   ` Nikita Kiryanov
2013-11-28 16:04 ` [U-Boot] [PATCH V2] arm: omap: " Nikita Kiryanov
2013-11-29 10:22   ` Enric Balletbo Serra
2013-11-29 16:05   ` Lubomir Popov
2013-12-02  7:08   ` Andreas Naumann
2013-12-02 12:48   ` Thomas Petazzoni
2013-12-02 15:47   ` Lubomir Popov
2013-12-03  4:02     ` Lokesh Vutla [this message]
2013-12-03  8:50       ` Lubomir Popov
2013-12-03 11:10         ` Lokesh Vutla
2013-12-09  6:57   ` [U-Boot] [U-Boot, " 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=529D57E6.1070401@ti.com \
    --to=lokeshvutla@ti.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox