onenand_uboot.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 mtd_info;
  17. struct erase_info;
  18. struct onenand_chip;
  19. extern struct mtd_info onenand_mtd;
  20. /* board */
  21. extern void onenand_board_init(struct mtd_info *);
  22. /* Functions */
  23. extern void onenand_init(void);
  24. extern int onenand_read(struct mtd_info *mtd, loff_t from, size_t len,
  25. size_t * retlen, u_char * buf);
  26. extern int onenand_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops);
  27. extern int onenand_write(struct mtd_info *mtd, loff_t from, size_t len,
  28. size_t * retlen, const u_char * buf);
  29. extern int onenand_erase(struct mtd_info *mtd, struct erase_info *instr);
  30. extern char *onenand_print_device_info(int device, int version);
  31. /* S3C64xx */
  32. extern void s3c64xx_onenand_init(struct mtd_info *);
  33. extern void s3c64xx_set_width_regs(struct onenand_chip *);
  34. #endif /* __UBOOT_ONENAND_H */