public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Juha Kuikka <juha.kuikka@gmail.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH] OMAP2 NAND: Fix __raw_readsl() length argument
Date: Wed, 22 Oct 2008 15:02:52 -0700	[thread overview]
Message-ID: <200810221502.53045.david-b@pacbell.net> (raw)
In-Reply-To: <a46a26fd0810221452x1edfead1l524270ddaf250e2a@mail.gmail.com>

On Wednesday 22 October 2008, Juha Kuikka wrote:
> >> -       __raw_readsl(nand->IO_ADDR_R, buf, len / 2);
> >> +       __raw_readsl(nand->IO_ADDR_R, buf, len / 4);
> >>  }
> >
> > Shouldn't that have been __raw_readsw() though?
>
> Hmh, good point.

Yeah, but the bug was from a patch from me ... sigh.

 
> From the original code it looks like that was the intention but
> readsl() works just as well.

Really?  Both upper and lower 16-bit units have the right data?


> I tested this on OMAP2430 and it works ok.
> 
> I don't see any mentions in the TRM about the width of the
> GPMC_NAND_DATA registers but apparently the NAND engine happily
> accepts 32bit accesses on bus.

Maybe this has to do with the FIFO behavior.  It would certainly
make sense to allow reads of any size from the FIFO.  If it were
raw reads on the data bus, then I'd expect that both 8 and 16 bit
widths would work.  (Assuming NAND chips weren't in parallel...)

If the FIFO is active, and specified to support arbitrary width
accesses (that don't match the data bus), then by all means use
the __raw_readsl() call to maximize bandwidth use.

- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-10-22 22:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-22 20:58 [PATCH] OMAP2 NAND: Fix __raw_readsl() length argument Juha Kuikka
2008-10-22 21:46 ` David Brownell
2008-10-22 21:52   ` Juha Kuikka
2008-10-22 22:02     ` David Brownell [this message]
2008-10-22 22:23       ` Juha Kuikka
2008-10-23 21:51         ` Juha Kuikka
2008-10-23 22:16           ` David Brownell
2008-10-25  0:19             ` Bug: enabling USB-TLL fclk Pandita, Vikram
2008-12-05 23:05               ` Steve Sakoman
2008-10-24  6:44           ` [PATCH] OMAP2 NAND: Fix __raw_readsl() length argument Singh, Vimal

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=200810221502.53045.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=juha.kuikka@gmail.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