]> git.sur5r.net Git - u-boot/blobdiff - doc/README.nand
Merge branch 'master' of git://git.denx.de/u-boot-uniphier
[u-boot] / doc / README.nand
index 0ff56331d5f92ec1ba0dbea186e40d36b4a06cb2..96ffc489408853729292bb1818e4af2c355c9df5 100644 (file)
@@ -94,7 +94,7 @@ Configuration Options:
        address of u-boot MTD partition in NAND.
 
    CONFIG_CMD_NAND
-      Enables NAND support and commmands.
+      Enables NAND support and commands.
 
    CONFIG_CMD_NAND_TORTURE
       Enables the torture command (see description of this command below).
@@ -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