dev-nfc.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Atheros AR934X SoCs built-in NAND Flash Controller support
  3. *
  4. * Copyright (C) 2011-2012 Gabor Juhos <juhosg@openwrt.org>
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published
  8. * by the Free Software Foundation.
  9. */
  10. #ifndef _ATH79_DEV_NFC_H
  11. #define _ATH79_DEV_NFC_H
  12. struct mtd_partition;
  13. enum ar934x_nfc_ecc_mode;
  14. #ifdef CONFIG_ATH79_DEV_NFC
  15. void ath79_nfc_set_parts(struct mtd_partition *parts, int nr_parts);
  16. void ath79_nfc_set_select_chip(void (*f)(int chip_no));
  17. void ath79_nfc_set_scan_fixup(int (*f)(struct mtd_info *mtd));
  18. void ath79_nfc_set_swap_dma(bool enable);
  19. void ath79_nfc_set_ecc_mode(enum ar934x_nfc_ecc_mode mode);
  20. void ath79_register_nfc(void);
  21. #else
  22. static inline void ath79_nfc_set_parts(struct mtd_partition *parts,
  23. int nr_parts) {}
  24. static inline void ath79_nfc_set_select_chip(void (*f)(int chip_no)) {}
  25. static inline void ath79_nfc_set_scan_fixup(int (*f)(struct mtd_info *mtd)) {}
  26. static inline void ath79_nfc_set_swap_dma(bool enable) {}
  27. static inline void ath79_nfc_set_ecc_mode(enum ar934x_nfc_ecc_mode mode) {}
  28. static inline void ath79_register_nfc(void) {}
  29. #endif
  30. #endif /* _ATH79_DEV_NFC_H */