OSDN Git Service

Check in released NDK version r4.
[android-x86/prebuilt.git] / ndk / android-ndk-r4 / linux / platforms / android-4 / arch-arm / usr / include / linux / mtd / flashchip.h
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ****************************************************************************
11  ****************************************************************************/
12 #ifndef __MTD_FLASHCHIP_H__
13 #define __MTD_FLASHCHIP_H__
14
15 #include <linux/sched.h>
16
17 typedef enum {
18  FL_READY,
19  FL_STATUS,
20  FL_CFI_QUERY,
21  FL_JEDEC_QUERY,
22  FL_ERASING,
23  FL_ERASE_SUSPENDING,
24  FL_ERASE_SUSPENDED,
25  FL_WRITING,
26  FL_WRITING_TO_BUFFER,
27  FL_OTP_WRITE,
28  FL_WRITE_SUSPENDING,
29  FL_WRITE_SUSPENDED,
30  FL_PM_SUSPENDED,
31  FL_SYNCING,
32  FL_UNLOADING,
33  FL_LOCKING,
34  FL_UNLOCKING,
35  FL_POINT,
36  FL_XIP_WHILE_ERASING,
37  FL_XIP_WHILE_WRITING,
38  FL_UNKNOWN
39 } flstate_t;
40
41 struct flchip {
42  unsigned long start;
43
44  int ref_point_counter;
45  flstate_t state;
46  flstate_t oldstate;
47
48  unsigned int write_suspended:1;
49  unsigned int erase_suspended:1;
50  unsigned long in_progress_block_addr;
51
52  spinlock_t *mutex;
53  spinlock_t _spinlock;
54  wait_queue_head_t wq;
55  int word_write_time;
56  int buffer_write_time;
57  int erase_time;
58
59  void *priv;
60 };
61
62 struct flchip_shared {
63  spinlock_t lock;
64  struct flchip *writing;
65  struct flchip *erasing;
66 };
67
68 #endif