Use the mtd_type_is_nand_user() helper to check if it is a NAND
(including SLC/MLC).
Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
printf("Writing OTP user data on %s at offset 0x%"PRIxoff_t"\n", argv[2], offset);
- if (mtdInfo.type == MTD_NANDFLASH)
+ if (mtd_type_is_nand_user(&mtdInfo))
len = mtdInfo.writesize;
else
len = 256;
}
p = buf;
while (size > 0) {
- if (mtdInfo.type == MTD_NANDFLASH) {
+ if (mtd_type_is_nand_user(&mtdInfo)) {
/* Fill remain buffers with 0xff */
memset(buf + size, 0xff, mtdInfo.writesize - size);
size = mtdInfo.writesize;