linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: w.sang@pengutronix.de (Wolfram Sang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] I2C: Implement DMA support into mxs-i2c
Date: Mon, 30 Apr 2012 21:52:21 +0200	[thread overview]
Message-ID: <20120430195221.GB28226@pengutronix.de> (raw)
In-Reply-To: <201204301410.14393.marex@denx.de>


> > >  static int mxs_i2c_finish_read(struct mxs_i2c_dev *i2c, u8 *buf, int
> > >  len) {
> > > 
> > > -	u32 data;
> > > +	u32 data = 0;
> > 
> > Unrelated, useless change.
> 
> Have you tried compiling the code with gcc 4.7?

What has the compiler version to do with the relevance? :) This has
nothing to do with adding DMA support. Plus, nobody so far could tell me
what path gcc is seeing there.

> > > +	i2c->dma_mode = 1;
> > 
> > Have you measured the overhead of DMA? I'd still think that
> > 
> > 	if (MX23 || msg->len > 24)
> > 		do_dma
> > 	else
> > 		do_pioqueue
> > 
> > might be worth considered.
> 
> It might, but in the 2.6.35.3 I have from FSL, it only does:
> 
> WARN_ONCE(len > 24, "choose DMA mode if xfer len > 24 bytes\n");

Well, we are back to the "FSL code is just a reference" topic. I truly
hope that part was implemented because of laziness and not because of
hardware limitations.

> Also, I tried switching PIOQUEUE/DMA, but didn't get it working. We might as 
> well make this dma/pioqueue mode configurable as well as speed via platform data 
> until someone comes up with a patch that can mix pioqueue and dma?

User configuration is not an option here IMO, because PIOQUEUE would still
fail for bigger transfers. "Always DMA" might be better then. But I will
try to switch modes this week, that's just too tempting.

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120430/b81d51a3/attachment.sig>

  reply	other threads:[~2012-04-30 19:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-29 22:36 [PATCH 1/2] I2C: Set I2C timing registers for mxs-i2c Marek Vasut
2012-04-29 22:36 ` [PATCH 2/2] I2C: Implement DMA support into mxs-i2c Marek Vasut
2012-04-30  6:05   ` Wolfram Sang
2012-04-30 12:10     ` Marek Vasut
2012-04-30 19:52       ` Wolfram Sang [this message]
2012-04-30 20:07         ` Marek Vasut
2012-04-30 20:30           ` Wolfram Sang
2012-04-30 20:45             ` Marek Vasut
2012-04-30 21:01               ` Wolfram Sang
2012-04-30 21:19                 ` Marek Vasut
2012-05-01 13:58                 ` Shawn Guo
2012-05-01 14:02                   ` Marek Vasut
2012-05-01 14:09                     ` Shawn Guo
2012-05-01 14:14                       ` Marek Vasut
2012-05-01 14:37                   ` Russell King - ARM Linux
2012-04-30  5:58 ` [PATCH 1/2] I2C: Set I2C timing registers for mxs-i2c Wolfram Sang
2012-04-30 12:05   ` Marek Vasut
2012-04-30 19:43     ` Wolfram Sang
2012-04-30 20:09       ` Marek Vasut
2012-04-30 20:27         ` Wolfram Sang
2012-04-30 20:47           ` Marek Vasut
2012-04-30 21:02             ` Wolfram Sang

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=20120430195221.GB28226@pengutronix.de \
    --to=w.sang@pengutronix.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).