i.MX28 gpmi-nand underlying geometry

Paul B. Henson henson at acm.org
Sun Mar 24 23:18:09 EDT 2013


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…



More information about the linux-mtd mailing list