]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/mtd/nand.h
mtd: nand: add Macronix manufacturer
[mv-sheeva.git] / include / linux / mtd / nand.h
index 5f3fdd9877b7ef7f3ca358d18bac9e041d928a39..63b5a8b6dfbda263525aada5aeee309b312b2620 100644 (file)
@@ -341,6 +341,7 @@ struct nand_hw_control {
  * @write_page:        function to write a page according to the ECC generator
  *             requirements.
  * @write_oob_raw:     function to write chip OOB data without ECC
+ * @read_oob_raw:      function to read chip OOB data without ECC
  * @read_oob:  function to read chip OOB data
  * @write_oob: function to write chip OOB data
  */
@@ -371,6 +372,8 @@ struct nand_ecc_ctrl {
                        const uint8_t *buf);
        int (*write_oob_raw)(struct mtd_info *mtd, struct nand_chip *chip,
                        int page);
+       int (*read_oob_raw)(struct mtd_info *mtd, struct nand_chip *chip,
+                       int page, int sndcmd);
        int (*read_oob)(struct mtd_info *mtd, struct nand_chip *chip, int page,
                        int sndcmd);
        int (*write_oob)(struct mtd_info *mtd, struct nand_chip *chip,
@@ -424,14 +427,14 @@ struct nand_buffers {
  * @ecc:               [BOARDSPECIFIC] ECC control structure
  * @buffers:           buffer structure for read/write
  * @hwcontrol:         platform-specific hardware control structure
- * @ops:               oob operation operands
  * @erase_cmd:         [INTERN] erase command write function, selectable due
  *                     to AND support.
  * @scan_bbt:          [REPLACEABLE] function to scan bad block table
  * @chip_delay:                [BOARDSPECIFIC] chip dependent delay for transferring
  *                     data from array to read regs (tR).
  * @state:             [INTERN] the current state of the NAND device
- * @oob_poi:           poison value buffer
+ * @oob_poi:           "poison value buffer," used for laying out OOB data
+ *                     before writing
  * @page_shift:                [INTERN] number of address bits in a page (column
  *                     address bits).
  * @phys_erase_shift:  [INTERN] number of address bits in a physical eraseblock
@@ -531,8 +534,6 @@ struct nand_chip {
        struct nand_buffers *buffers;
        struct nand_hw_control hwcontrol;
 
-       struct mtd_oob_ops ops;
-
        uint8_t *bbt;
        struct nand_bbt_descr *bbt_td;
        struct nand_bbt_descr *bbt_md;
@@ -554,6 +555,7 @@ struct nand_chip {
 #define NAND_MFR_HYNIX         0xad
 #define NAND_MFR_MICRON                0x2c
 #define NAND_MFR_AMD           0x01
+#define NAND_MFR_MACRONIX      0xc2
 
 /**
  * struct nand_flash_dev - NAND Flash Device ID Structure