public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: "Govindraj.R" <govindraj.raja@ti.com>
Cc: linux-omap@vger.kernel.org, Kevin Hilman <khilman@deeprootsystems.com>
Subject: Re: [PATCH v5] OMAP UART: Add omap-serial driver support.
Date: Thu, 4 Feb 2010 14:33:13 -0600	[thread overview]
Message-ID: <20100204203313.GB711@lixom.net> (raw)
In-Reply-To: <40204.192.168.10.88.1265298323.squirrel@dbdmail.itg.ti.com>

On Thu, Feb 04, 2010 at 09:15:23PM +0530, Govindraj.R wrote:

> > Ah. Care to update the comment to mention that? I guess the case above is similar.
> 
> 
> Before accessing FCR we need to write 0x00 to LCR,
> 
> I will correct it as,
> 
> /**** Access to FCR requires writing Ox00 to LCR *****/

Sounds good (but please use standard comment format, no extra *:s).

> >
> >> > Nearly every OMAP setup seems to prefer 115200 as default baudrate, right?
> >>
> >> Yes, but shouldn't we initialize to lowest possible baud?
> >
> > I don't see why that should be done. It's easiest if it's initialized
> > to the most commonly used speed, that way people can drop the annoying
> > ",115200" from the console bootarg string.
> >
> >> >> +static
> >> >> +int serial_omap_suspend(struct platform_device *pdev, pm_message_t state)
> >> >
> >> > No linewrap (checkpatch should have caught this)
> >>
> >> I use checkpatch --strict,
> >> don't know how this passed
> >
> >
> > Yeah, seems like it doesn't check for it. :-) No big deal but since I was already
> > commenting on other things in the patch I mentioned it.
> >
> >> >> + ? ? ? ? ? ? ? ? ? ? up->uart_dma.tx_buf_dma_phys + UART_XMIT_SIZE)
> >> >> + ? ? ? ? ? ? up->uart_dma.tx_buf_size =
> >> >> + ? ? ? ? ? ? ? ? ? ? (up->uart_dma.tx_buf_dma_phys + UART_XMIT_SIZE) - start;
> >> >> + ? ? omap_set_dma_dest_params(up->uart_dma.tx_dma_channel, 0,
> >> >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? OMAP_DMA_AMODE_CONSTANT,
> >> >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? up->uart_dma.uart_base, 0, 0);
> >> >> + ? ? omap_set_dma_src_params(up->uart_dma.tx_dma_channel, 0,
> >> >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? OMAP_DMA_AMODE_POST_INC, start, 0, 0);
> >> >> + ? ? omap_set_dma_transfer_params(up->uart_dma.tx_dma_channel,
> >> >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? OMAP_DMA_DATA_TYPE_S8,
> >> >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? up->uart_dma.tx_buf_size, 1,
> >> >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? OMAP_DMA_SYNC_ELEMENT,
> >> >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? up->uart_dma.uart_dma_tx, 0);
> >> >
> >> >
> >> > Isn't there a dma_sync call missing somewhere around here? Same for
> >> > the similar RX setup (both before DMA is started, as well as once it is
> >> > completed on the RX side).
> >>
> >> Sorry i didn't get you here as don't see any such dma_sync call
> >> in arch/arm/plat-omap/dma.c.
> >
> > It's not part of the OMAP dma driver, but instead it's part of the
> > DMA mapping API.  You have to make sure that the buffers (as well as
> > descriptors) that the DMA engine are going to access will be written to
> > the level of coherency (i.e. memory) before the operation begins (for
> > dma-from-memory), and you have to make sure any caches are invalidated
> > after the operation completes and you wish to read the resulting data
> > (for dma-to-memory).
> >
> 
> Could you refer me to any omap driver that currently use dma_sync?

Actually, I think this is an issue that most of them have to date, and
that something that will sting and burn and need fixing. It'll cause
weird and hard to diagnose problems for down the road.

So, while it's something that needs fixing, a clear FIXME comment might
be sufficient for now while the rest is cleaned up as well.

/* FIXME: Cache maintenance needed here? */

Or similar.


-Olof

      parent reply	other threads:[~2010-02-04 20:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-27  9:56 [PATCH v5] OMAP UART: Add omap-serial driver support Govindraj.R
2010-01-27 17:25 ` Tony Lindgren
2010-01-27 17:49   ` Kevin Hilman
2010-01-27 17:57     ` Tony Lindgren
2010-01-27 18:07       ` Kevin Hilman
2010-01-27 18:18         ` Tony Lindgren
2010-01-27 19:10           ` Kevin Hilman
2010-01-27 19:33             ` Tony Lindgren
2010-02-10 14:39   ` Govindraj
2010-02-10 17:25     ` Tony Lindgren
2010-01-27 18:20 ` Kevin Hilman
2010-01-27 19:37   ` Kevin Hilman
2010-01-28  3:22 ` Olof Johansson
2010-02-04 15:09   ` Govindraj.R
2010-02-04 15:28     ` Olof Johansson
2010-02-04 15:45       ` Govindraj.R
2010-02-04 17:46         ` Kevin Hilman
2010-02-04 20:37           ` Olof Johansson
2010-02-04 20:33         ` Olof Johansson [this message]

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=20100204203313.GB711@lixom.net \
    --to=olof@lixom.net \
    --cc=govindraj.raja@ti.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.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