linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: bornet.romain@gmail.com (Romain Bornet)
To: linux-arm-kernel@lists.infradead.org
Subject: NDCBx registers in PXA3XX MTD driver
Date: Thu, 18 Feb 2010 13:06:23 +0100	[thread overview]
Message-ID: <62fd715d1002180406y1181bbe9y83ba3cd0277989c4@mail.gmail.com> (raw)

Hi folks,

I'm rather new in the ARM / Linux world and currently working on a
PXA168-based board.

I'm trying to understand the implementation of the pxa3xx_nand.c
driver and came across 3 lines of code I cannot understand.

The 3 lines in question are the one where the NDCB0/1/2 registers are
written in write_cmd()
---
nand_writel(info, NDCB0, info->ndcb0);
nand_writel(info, NDCB0, info->ndcb1);
nand_writel(info, NDCB0, info->ndcb2);
---

see here for context...
http://lxr.linux.no/#linux+v2.6.32/drivers/mtd/nand/pxa3xx_nand.c#L459

Why are all 3 values (ndcb0, ndcb1, ndcb2) written to the same
register NDCB0 whereas the PXA3xx and PXA168 have different offsets
(0x48, 0x4C and 0x50) for these 3 registers as documented in
PXA3xx_DM_Vol_II in chapter "3.8.10 NAND Controller Command Buffers
(NDCBx)" (available from Marvell @
http://www.marvell.com/products/processors/applications/pxa_3xx/PXA3xx_Developers_Manual.zip
)

I first thought about a possible hardware Errata but couldn't find any
hint in this direction.

I would have expected

nand_writel(info, NDCB0, info->ndcb0);
nand_writel(info, NDCB1, info->ndcb1);
nand_writel(info, NDCB2, info->ndcb2);


Any clue on this?

Thanks for your help !
    Romain

             reply	other threads:[~2010-02-18 12:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-18 12:06 Romain Bornet [this message]
2010-02-18 12:39 ` NDCBx registers in PXA3XX MTD driver Eric Miao
2010-02-18 13:11   ` Romain Bornet

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=62fd715d1002180406y1181bbe9y83ba3cd0277989c4@mail.gmail.com \
    --to=bornet.romain@gmail.com \
    --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).