onenand_uboot.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Header file for OneNAND support for U-Boot
  3. *
  4. * Adaptation from kernel to U-Boot
  5. *
  6. * Copyright (C) 2005-2007 Samsung Electronics
  7. * Kyungmin Park <kyungmin.park@samsung.com>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #ifndef __UBOOT_ONENAND_H
  14. #define __UBOOT_ONENAND_H
  15. #include <linux/types.h>
  16. struct kvec {
  17. void *iov_base;
  18. size_t iov_len;
  19. };
  20. typedef int spinlock_t;
  21. typedef int wait_queue_head_t;
  22. struct mtd_info;
  23. struct erase_info;
  24. /* Functions */
  25. extern void onenand_init(void);
  26. extern int onenand_read(struct mtd_info *mtd, loff_t from, size_t len,
  27. size_t * retlen, u_char * buf);
  28. extern int onenand_read_oob(struct mtd_info *mtd, loff_t from, size_t len,
  29. size_t * retlen, u_char * buf);
  30. extern int onenand_write(struct mtd_info *mtd, loff_t from, size_t len,
  31. size_t * retlen, const u_char * buf);
  32. extern int onenand_erase(struct mtd_info *mtd, struct erase_info *instr);
  33. extern int onenand_unlock(struct mtd_info *mtd, loff_t ofs, size_t len);
  34. extern void onenand_print_device_info(int device, int verbose);
  35. #endif /* __UBOOT_ONENAND_H */