X-Git-Url: https://rtime.felk.cvut.cz/gitweb/l4.git/blobdiff_plain/0440e3159914b79a728a94d79bc6631526d77ba1..51f012d0ec4f0ad687159ed6685b73f90f1cfc71:/l4/pkg/linux-26-headers/include/mtd/mtd-abi.h diff --git a/l4/pkg/linux-26-headers/include/mtd/mtd-abi.h b/l4/pkg/linux-26-headers/include/mtd/mtd-abi.h index 576e8c95e..20444f377 100644 --- a/l4/pkg/linux-26-headers/include/mtd/mtd-abi.h +++ b/l4/pkg/linux-26-headers/include/mtd/mtd-abi.h @@ -94,10 +94,10 @@ struct mtd_write_req { #define MTD_RAM 1 #define MTD_ROM 2 #define MTD_NORFLASH 3 -#define MTD_NANDFLASH 4 +#define MTD_NANDFLASH 4 /* SLC NAND */ #define MTD_DATAFLASH 6 #define MTD_UBIVOLUME 7 -#define MTD_MLCNANDFLASH 8 +#define MTD_MLCNANDFLASH 8 /* MLC NAND (including TLC) */ #define MTD_WRITEABLE 0x400 /* Device is writeable */ #define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */ @@ -109,6 +109,7 @@ struct mtd_write_req { #define MTD_CAP_RAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE) #define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE) #define MTD_CAP_NANDFLASH (MTD_WRITEABLE) +#define MTD_CAP_NVRAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE) /* Obsolete ECC byte placement modes (used with obsolete MEMGETOOBSEL) */ #define MTD_NANDECC_OFF 0 // Switch off ECC (Not recommended) @@ -275,4 +276,9 @@ enum mtd_file_modes { MTD_FILE_MODE_RAW, }; +static __inline__ int mtd_type_is_nand_user(const struct mtd_info_user *mtd) +{ + return mtd->type == MTD_NANDFLASH || mtd->type == MTD_MLCNANDFLASH; +} + #endif /* __MTD_ABI_H__ */