of_mtd.h 749 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
  3. *
  4. * OF helpers for mtd.
  5. *
  6. * This file is released under the GPLv2
  7. */
  8. #ifndef __LINUX_OF_MTD_H
  9. #define __LINUX_OF_NET_H
  10. #ifdef CONFIG_OF_MTD
  11. #include <linux/of.h>
  12. int of_get_nand_ecc_mode(struct device_node *np);
  13. int of_get_nand_bus_width(struct device_node *np);
  14. bool of_get_nand_on_flash_bbt(struct device_node *np);
  15. #else /* CONFIG_OF_MTD */
  16. static inline int of_get_nand_ecc_mode(struct device_node *np)
  17. {
  18. return -ENOSYS;
  19. }
  20. static inline int of_get_nand_bus_width(struct device_node *np)
  21. {
  22. return -ENOSYS;
  23. }
  24. static inline bool of_get_nand_on_flash_bbt(struct device_node *np)
  25. {
  26. return false;
  27. }
  28. #endif /* CONFIG_OF_MTD */
  29. #endif /* __LINUX_OF_MTD_H */