summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-06-04 08:49:47 -0400
committerTom Rini <trini@konsulko.com>2016-06-04 08:49:47 -0400
commit715b3a9b2486e8d7a32365d817c77209b35ee796 (patch)
tree5daa126a15d2e0d60156664d19adbf451324d098 /doc
parentc41c649c2fdec7bf6ef84173597cc3feabdb7828 (diff)
parent667067faa18334f1e28c01b47530b5cce1b6182f (diff)
downloadu-boot-imx-715b3a9b2486e8d7a32365d817c77209b35ee796.zip
u-boot-imx-715b3a9b2486e8d7a32365d817c77209b35ee796.tar.gz
u-boot-imx-715b3a9b2486e8d7a32365d817c77209b35ee796.tar.bz2
Merge git://git.denx.de/u-boot-nand-flash
Diffstat (limited to 'doc')
-rw-r--r--doc/README.nand15
1 files changed, 6 insertions, 9 deletions
diff --git a/doc/README.nand b/doc/README.nand
index 545d88c..96ffc48 100644
--- a/doc/README.nand
+++ b/doc/README.nand
@@ -136,15 +136,8 @@ Configuration Options:
Example of new init to be added to the end of an existing driver
init:
- /*
- * devnum is the device number to be used in nand commands
- * and in mtd->name. Must be less than
- * CONFIG_SYS_NAND_MAX_DEVICE.
- */
- mtd = &nand_info[devnum];
-
/* chip is struct nand_chip, and is now provided by the driver. */
- mtd->priv = &chip;
+ mtd = &chip.mtd;
/*
* Fill in appropriate values if this driver uses these fields,
@@ -165,7 +158,11 @@ Configuration Options:
if (nand_scan_tail(mtd))
error out
- if (nand_register(devnum))
+ /*
+ * devnum is the device number to be used in nand commands
+ * and in mtd->name. Must be less than CONFIG_SYS_NAND_MAX_DEVICE.
+ */
+ if (nand_register(devnum, mtd))
error out
In addition to providing more flexibility to the driver, it reduces