From: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>
To: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Fabio Estevam <festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: possible MXS-i2c bug
Date: Fri, 27 Apr 2012 01:10:21 +0200 [thread overview]
Message-ID: <201204270110.21377.marex@denx.de> (raw)
In-Reply-To: <20120426114201.GC3548-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Dear Wolfram Sang,
> Hi Marek,
>
> you forgot the most important list, linux-i2c ;)
>
> > I recently tried mxs-i2c (on 3.4-rc4) with at24 eeprom, didn't work as
> > expected.
>
> Yes, we had the same this week/last week.
Ah ok ;-)
>
> > 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.
>
> Try removing the printk and use the module paramter "io_limit=24" for
> at24. Does this help? (Or bs<=24 with dd)
>
> > If noone has any fixes already, I'll debug this tonight or so.
>
> The write FIFO overflows, since it only can carry 8 words. There is
> currently no check for that. One solution would be to check the FIFO
> status and fill them as needed. This will probably require additional
> locking, so I think the proper solution would be to use DMA for
> transfers bigger than the write FIFO size (we would get MX23 support
> then, too). Sadly, we don't have DMA support yet and I don't have time
> to implement it.
>
> I am thinking if such transfers which would fail anyway, should
> currently be rejected or if the driver should depend on BROKEN or both.
>
> I am still undecided, though.
I've been thinking about the DMA approach. The problem I found out is that we
need to transfer all messages we're given at time in one DMA chain ... at least
that's how I understand it from the FSL manual (see Fig. 27-10 in the mx28
manual).
Therefore we'd have to prepare scatterlist for each message that we're given to
transfer. In case we'd be given huge set of messages, we'd have to allocate
these scatterlists at runtime. And maybe we'd even have to allocate buffers (to
resize the ones in msg.buf for the additional one byte for i2c address).
I don't like the idea of calling kmalloc() in mxs_i2c_xfer_message() at all,
does anyone have any hint how to handle these?
>
> Please also check the patch I sent yesterday, there is also another one
> coming after I get confirmation from a customer.
Thanks
> Regards,
>
> Wolfram
Best regards,
Marek Vasut
next prev parent reply other threads:[~2012-04-26 23:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201204261326.29388.marex@denx.de>
[not found] ` <201204261326.29388.marex-ynQEQJNshbs@public.gmane.org>
2012-04-26 11:42 ` possible MXS-i2c bug Wolfram Sang
[not found] ` <20120426114201.GC3548-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-04-26 23:10 ` Marek Vasut [this message]
[not found] ` <201204270110.21377.marex-ynQEQJNshbs@public.gmane.org>
2012-04-27 14:59 ` Wolfram Sang
[not found] ` <20120427145936.GD16504-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-04-27 15:08 ` Marek Vasut
[not found] ` <201204271708.53467.marex-ynQEQJNshbs@public.gmane.org>
2012-04-27 15:41 ` Wolfram Sang
[not found] ` <20120427154119.GF16504-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-04-27 15:53 ` Marek Vasut
[not found] ` <201204271753.39516.marex-ynQEQJNshbs@public.gmane.org>
2012-04-27 16:37 ` Wolfram Sang
[not found] ` <20120427163756.GH16504-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
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=201204270110.21377.marex@denx.de \
--to=marex-ynqeqjnshbs@public.gmane.org \
--cc=festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.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).