Blame view

include/ubi_uboot.h 2.2 KB
7e6ee7ad2   Kyungmin Park   UBI: Add basic UB...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  /*
   * Header file for UBI support for U-Boot
   *
   * Adaptation from kernel to U-Boot
   *
   *  Copyright (C) 2005-2007 Samsung Electronics
   *  Kyungmin Park <kyungmin.park@samsung.com>
   *
   * This program is free software; you can redistribute it and/or modify
   * it under the terms of the GNU General Public License version 2 as
   * published by the Free Software Foundation.
   */
  
  #ifndef __UBOOT_UBI_H
  #define __UBOOT_UBI_H
  
  #include <common.h>
d8bc55a6f   Anton Vorontsov   Move uninitialize...
18
  #include <compiler.h>
0c06db598   Heiko Schocher   lib, linux: move ...
19
  #include <linux/compat.h>
7e6ee7ad2   Kyungmin Park   UBI: Add basic UB...
20
21
  #include <malloc.h>
  #include <div64.h>
0c06db598   Heiko Schocher   lib, linux: move ...
22
  #include <linux/math64.h>
7e6ee7ad2   Kyungmin Park   UBI: Add basic UB...
23
  #include <linux/crc32.h>
9eefe2a2b   Stefan Roese   UBIFS: Implement ...
24
25
26
27
  #include <linux/types.h>
  #include <linux/list.h>
  #include <linux/rbtree.h>
  #include <linux/string.h>
7e6ee7ad2   Kyungmin Park   UBI: Add basic UB...
28
  #include <linux/mtd/mtd.h>
9eefe2a2b   Stefan Roese   UBIFS: Implement ...
29
  #include <linux/mtd/ubi.h>
7e6ee7ad2   Kyungmin Park   UBI: Add basic UB...
30
31
32
33
  
  #ifdef CONFIG_CMD_ONENAND
  #include <onenand_uboot.h>
  #endif
1221ce459   Masahiro Yamada   treewide: replace...
34
  #include <linux/errno.h>
7e6ee7ad2   Kyungmin Park   UBI: Add basic UB...
35

7e6ee7ad2   Kyungmin Park   UBI: Add basic UB...
36
  /* configurable */
7e6ee7ad2   Kyungmin Park   UBI: Add basic UB...
37
  #define CONFIG_MTD_UBI_BEB_RESERVE	1
7e6ee7ad2   Kyungmin Park   UBI: Add basic UB...
38
39
40
41
42
43
44
45
46
  
  /* debug options (Linux: drivers/mtd/ubi/Kconfig.debug) */
  #undef CONFIG_MTD_UBI_DEBUG
  #undef CONFIG_MTD_UBI_DEBUG_PARANOID
  #undef CONFIG_MTD_UBI_DEBUG_MSG
  #undef CONFIG_MTD_UBI_DEBUG_MSG_EBA
  #undef CONFIG_MTD_UBI_DEBUG_MSG_WL
  #undef CONFIG_MTD_UBI_DEBUG_MSG_IO
  #undef CONFIG_MTD_UBI_DEBUG_MSG_BLD
0c06db598   Heiko Schocher   lib, linux: move ...
47
48
  
  #undef CONFIG_MTD_UBI_BLOCK
d1cfeee91   Andrew Ruder   ubi: enable error...
49
50
51
52
53
54
55
  /* ubi_init() disables returning error codes when built into the Linux
   * kernel so that it doesn't hang the Linux kernel boot process.  Since
   * the U-Boot driver code depends on getting valid error codes from this
   * function we just tell the UBI layer that we are building as a module
   * (which only enables the additional error reporting).
   */
  #define CONFIG_MTD_UBI_MODULE
7e6ee7ad2   Kyungmin Park   UBI: Add basic UB...
56
57
58
59
60
  /* build.c */
  #define get_device(...)
  #define put_device(...)
  #define ubi_sysfs_init(...)		0
  #define ubi_sysfs_close(...)		do { } while (0)
7e6ee7ad2   Kyungmin Park   UBI: Add basic UB...
61

9eefe2a2b   Stefan Roese   UBIFS: Implement ...
62
  #ifndef __UBIFS_H__
7e6ee7ad2   Kyungmin Park   UBI: Add basic UB...
63
  #include "../drivers/mtd/ubi/ubi.h"
9eefe2a2b   Stefan Roese   UBIFS: Implement ...
64
  #endif
7e6ee7ad2   Kyungmin Park   UBI: Add basic UB...
65
66
67
68
  
  /* functions */
  extern int ubi_mtd_param_parse(const char *val, struct kernel_param *kp);
  extern int ubi_init(void);
2ee951ba2   Stefan Roese   UBI: Enable re-in...
69
  extern void ubi_exit(void);
718290675   Joe Hershberger   ubi: Expose a few...
70
71
72
  extern int ubi_part(char *part_name, const char *vid_header_offset);
  extern int ubi_volume_write(char *volume, void *buf, size_t size);
  extern int ubi_volume_read(char *volume, char *buf, size_t size);
7e6ee7ad2   Kyungmin Park   UBI: Add basic UB...
73
74
  
  extern struct ubi_device *ubi_devices[];
14dfc6482   Tien Fong Chee   cmd: ubifs: Facto...
75
  int cmd_ubifs_mount(char *vol_name);
10c204406   Tien Fong Chee   cmd: ubifs: Move ...
76
  int cmd_ubifs_umount(void);
7e6ee7ad2   Kyungmin Park   UBI: Add basic UB...
77
78
  
  #endif