linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Paul B. Henson" <henson@acm.org>
To: linux-mtd@lists.infradead.org
Subject: i.MX28 gpmi-nand underlying geometry
Date: Sun, 24 Mar 2013 20:18:09 -0700	[thread overview]
Message-ID: <514FC1F1.8040500@acm.org> (raw)

I'm trying to get the Freescale kobs-ng tool (used to burn boot images 
to NAND) working under a current kernel.

Under the 2.6 kernel that Freescale ships with their BSP, access to the 
NAND is via the gpmi-nfc driver, which creates a sysfs node at 
/sys/bus/platform/devices/gpmi-nfc.0/nfc_geometry exposing the 
underlying geometry of the NAND to user space.

The kobs-ng tool accesses this, and looks up:

"Page Size in Bytes"
"Metadata Size in Bytes"
"ECC Chunk Size in Bytes"
"ECC Chunk Count"
"Block Mark Byte Offset"
"Block Mark Bit Offset"

(I think it might only actually be using the last two, but am not 
completely sure at this point)

With a current kernel, access to the NAND uses the gpmi-nand driver. 
Almost the exactly identical geometry information is printed out by 
gpmi_dump_info in gpmi-lib.c, but evidently only in the case of a kernel 
bug/error.

Is there any way to access this geometry information from user space 
with the gpmi-nand driver under a current kernel? After a few other 
minor changes, I was able to successfully get kobs-ng working by hard 
coding the values based on the output generated while booted under the 
Freescale kernel. Ideally I'd like to be able to read the necessary 
information directly from the NAND while booted with a current kernel.

Thanks much…

             reply	other threads:[~2013-03-25  3:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-25  3:18 Paul B. Henson [this message]
2013-03-25  7:19 ` i.MX28 gpmi-nand underlying geometry Huang Shijie
2013-03-25 18:39   ` Paul B. Henson
2013-03-26  2:17     ` Huang Shijie
2013-03-26 20:49       ` Paul B. Henson
2013-05-10 11:43   ` Artem Bityutskiy

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=514FC1F1.8040500@acm.org \
    --to=henson@acm.org \
    --cc=linux-mtd@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).