Merge git://git.denx.de/u-boot-dm
[oweals/u-boot.git] / drivers / mtd / nand / atmel_nand_ecc.h
index 55d7711c8bd22b4a30d80b647dd1df4a5adb848c..eac860d13ca73638131f175fd28d6a38e47d738b 100644 (file)
@@ -34,6 +34,9 @@
 #define pmecc_readl(addr, reg) \
        readl(&addr->reg)
 
+#define pmecc_readb(addr, reg) \
+       readb(&addr->reg)
+
 #define pmecc_writel(addr, reg, value) \
        writel((value), &addr->reg)
 
@@ -138,6 +141,10 @@ struct pmecc_errloc_regs {
 #define PMECC_GF_DIMENSION_13                  13
 #define PMECC_GF_DIMENSION_14                  14
 
+/* Primitive Polynomial used by PMECC */
+#define PMECC_GF_13_PRIMITIVE_POLY             0x201b
+#define PMECC_GF_14_PRIMITIVE_POLY             0x4443
+
 #define PMECC_INDEX_TABLE_SIZE_512             0x2000
 #define PMECC_INDEX_TABLE_SIZE_1024            0x4000