ar71xx: Add support for the OMYlink OMY-X1
[openwrt/openwrt.git] / target / linux / ar71xx / files / arch / mips / ath79 / dev-nfc.c
index 5208279ad9773e6f296e80b04aa5816ba538c6ae..9b5256ecc214978605d4ca74de3d38d924ad0f7e 100644 (file)
@@ -43,7 +43,7 @@ static void __init ath79_nfc_init_resource(struct resource res[2],
                                           unsigned long size,
                                           int irq)
 {
-       memset(res, 0, sizeof(res));
+       memset(res, 0, sizeof(struct resource) * 2);
 
        res[0].flags = IORESOURCE_MEM;
        res[0].start = base;
@@ -119,6 +119,11 @@ void __init ath79_nfc_set_swap_dma(bool enable)
        ath79_nfc_data.swap_dma = enable;
 }
 
+void __init ath79_nfc_set_ecc_mode(enum ar934x_nfc_ecc_mode mode)
+{
+       ath79_nfc_data.ecc_mode = mode;
+}
+
 void __init ath79_nfc_set_parts(struct mtd_partition *parts, int nr_parts)
 {
        ath79_nfc_data.parts = parts;