ubi_uboot.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Header file for UBI 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_UBI_H
  14. #define __UBOOT_UBI_H
  15. #include <common.h>
  16. #include <compiler.h>
  17. #include <linux/compat.h>
  18. #include <malloc.h>
  19. #include <div64.h>
  20. #include <linux/math64.h>
  21. #include <linux/crc32.h>
  22. #include <linux/types.h>
  23. #include <linux/list.h>
  24. #include <linux/rbtree.h>
  25. #include <linux/string.h>
  26. #include <linux/mtd/mtd.h>
  27. #include <linux/mtd/ubi.h>
  28. #ifdef CONFIG_CMD_ONENAND
  29. #include <onenand_uboot.h>
  30. #endif
  31. #include <linux/errno.h>
  32. /* build.c */
  33. #define get_device(...)
  34. #define put_device(...)
  35. #define ubi_sysfs_init(...) 0
  36. #define ubi_sysfs_close(...) do { } while (0)
  37. #ifndef __UBIFS_H__
  38. #include "../drivers/mtd/ubi/ubi.h"
  39. #endif
  40. /* functions */
  41. extern int ubi_mtd_param_parse(const char *val, struct kernel_param *kp);
  42. extern int ubi_init(void);
  43. extern void ubi_exit(void);
  44. extern int ubi_part(char *part_name, const char *vid_header_offset);
  45. extern int ubi_volume_write(char *volume, void *buf, size_t size);
  46. extern int ubi_volume_read(char *volume, char *buf, size_t size);
  47. extern struct ubi_device *ubi_devices[];
  48. int cmd_ubifs_mount(char *vol_name);
  49. int cmd_ubifs_umount(void);
  50. #endif