X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Flinux%2Fmtd%2Fonenand.h;h=e7b63ddd107243d93d2955e4c0b2656957b8f9ae;hb=bff4fae4fc29376e62ac6d420b189f23a57e4294;hp=68e174e310c9a780f2ee1b3d726809973843dcfd;hpb=35e3717772c8c3534c18d8aac69e4b822777c23b;p=oweals%2Fu-boot.git diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index 68e174e310..e7b63ddd10 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h @@ -17,7 +17,7 @@ /* Note: The header order is impoertant */ #include -#include +#include #include #define MAX_DIES 2 @@ -101,6 +101,7 @@ struct onenand_chip { size_t count); unsigned short (*read_word) (void __iomem *addr); void (*write_word) (unsigned short value, void __iomem *addr); + int (*chip_probe)(struct mtd_info *mtd); void (*mmcontrol) (struct mtd_info *mtd, int sync_read); int (*block_markbad)(struct mtd_info *mtd, loff_t ofs); int (*scan_bbt)(struct mtd_info *mtd); @@ -139,6 +140,9 @@ struct onenand_chip { #define ONENAND_IS_DDP(this) \ (this->device_id & ONENAND_DEVICE_IS_DDP) +#define ONENAND_IS_4KB_PAGE(this) \ + (this->options & ONENAND_HAS_4KB_PAGE) + #define ONENAND_IS_2PLANE(this) (0) /* @@ -147,6 +151,7 @@ struct onenand_chip { #define ONENAND_HAS_CONT_LOCK (0x0001) #define ONENAND_HAS_UNLOCK_ALL (0x0002) #define ONENAND_HAS_2PLANE (0x0004) +#define ONENAND_HAS_4KB_PAGE (0x0008) #define ONENAND_RUNTIME_BADBLOCK_CHECK (0x0200) #define ONENAND_PAGEBUF_ALLOC (0x1000) #define ONENAND_OOBBUF_ALLOC (0x2000) @@ -154,6 +159,7 @@ struct onenand_chip { /* * OneNAND Flash Manufacturer ID Codes */ +#define ONENAND_MFR_NUMONYX 0x20 #define ONENAND_MFR_SAMSUNG 0xec /**