drivers: mtd: nand: base: Add support for Hardware ECC for check bad block

Leverage linux code to support hardware ECC interface
to verify nand bad block.

Signed-off-by: Dinesh Maniyam <dinesh.maniyam@intel.com>
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
index 3bb0a36..3e80b13 100644
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
@@ -132,6 +132,17 @@
 #define NAND_DATA_IFACE_CHECK_ONLY	-1
 
 /*
+ * There are different places where the manufacturer stores the factory bad
+ * block markers.
+ *
+ * Position within the block: Each of these pages needs to be checked for a
+ * bad block marking pattern.
+ */
+#define NAND_BBM_FIRSTPAGE	BIT(24)
+#define NAND_BBM_SECONDPAGE	BIT(25)
+#define NAND_BBM_LASTPAGE	BIT(26)
+
+/*
  * Constants for ECC_MODES
  */
 typedef enum {