linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: possible MXS-i2c bug
Date: Thu, 26 Apr 2012 13:26:29 +0200	[thread overview]
Message-ID: <201204261326.29388.marex@denx.de> (raw)

Hi,

I recently tried mxs-i2c (on 3.4-rc4) with at24 eeprom, didn't work as expected.

Apparently, there might be some timing issue, when I put printk() into the at24 
driver eeprom write function, it "fixed" itself. Though, replacing the i2c 
driver with i2c gpio also fixed the issue, so I suspect the i2c driver has some 
flaw in it.

Further investigation turned out, that the complete() isn't called in the mxs-
i2c driver irq handler unless I put the printk(). Putting the printk() in the 
xfer function of the mxs-i2c driver instead of eeprom write function has the 
same effect -- "fixing" it.

I didn't have time to properly investigate this matter, so consider this as a 
quick and dirty bugreport (maybe?). But thie behavior I saw it quite easily 
replicated, try:

dd if=/dev/zero of=/sys/bus/devices/0-00XY/eeprom bs=<sizeof eeprom> count=1

And the write will timeout.

Has anyone recently tested the driver with such eeprom? Anything from the 24xxx 
series with 16 bit addresses has this problem. I tested and saw this on more 
than one board, so this is not hardware issue.

If noone has any fixes already, I'll debug this tonight or so.

Thanks!

Best regards,
Marek Vasut

             reply	other threads:[~2012-04-26 11:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-26 11:26 Marek Vasut [this message]
2012-04-26 11:41 ` possible MXS-i2c bug Fabio Estevam
2012-04-26 11:42 ` Wolfram Sang
2012-04-26 23:10   ` Marek Vasut
2012-04-27 14:59     ` Wolfram Sang
2012-04-27 15:08       ` Marek Vasut
2012-04-27 15:41         ` Wolfram Sang
2012-04-27 15:53           ` Marek Vasut
2012-04-27 16:37             ` Wolfram Sang
2012-04-28  3:03               ` [TEST PATCH] mxs-i2c DMA support Marek Vasut

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=201204261326.29388.marex@denx.de \
    --to=marex@denx.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).