+#else
+
+static int ar934x_nfc_ooblayout_ecc(struct mtd_info *mtd, int section,
+ struct mtd_oob_region *oobregion)
+{
+ if (section)
+ return -ERANGE;
+
+ oobregion->offset = 20;
+ oobregion->length = 28;
+
+ return 0;
+}
+
+static int ar934x_nfc_ooblayout_free(struct mtd_info *mtd, int section,
+ struct mtd_oob_region *oobregion)
+{
+ switch (section) {
+ case 0:
+ oobregion->offset = 4;
+ oobregion->length = 16;
+ return 0;
+ case 1:
+ oobregion->offset = 48;
+ oobregion->length = 16;
+ return 0;
+ default:
+ return -ERANGE;
+ }
+}
+
+static const struct mtd_ooblayout_ops ar934x_nfc_ecclayout_ops = {
+ .ecc = ar934x_nfc_ooblayout_ecc,
+ .free = ar934x_nfc_ooblayout_free,
+};
+#endif /* < 4.6 */
+