• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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   ***   To edit the content of this header, modify the corresponding
11   ***   source file (e.g. under external/kernel-headers/original/) then
12   ***   run bionic/libc/kernel/tools/update_all.py
13   ***
14   ***   Any manual change here will be lost the next time this script will
15   ***   be run. You've been warned!
16   ***
17   ****************************************************************************
18   ****************************************************************************/
19  #ifndef __MTD_FLASHCHIP_H__
20  #define __MTD_FLASHCHIP_H__
21  #include <linux/sched.h>
22  typedef enum {
23  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24   FL_READY,
25   FL_STATUS,
26   FL_CFI_QUERY,
27   FL_JEDEC_QUERY,
28  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29   FL_ERASING,
30   FL_ERASE_SUSPENDING,
31   FL_ERASE_SUSPENDED,
32   FL_WRITING,
33  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34   FL_WRITING_TO_BUFFER,
35   FL_OTP_WRITE,
36   FL_WRITE_SUSPENDING,
37   FL_WRITE_SUSPENDED,
38  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39   FL_PM_SUSPENDED,
40   FL_SYNCING,
41   FL_UNLOADING,
42   FL_LOCKING,
43  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44   FL_UNLOCKING,
45   FL_POINT,
46   FL_XIP_WHILE_ERASING,
47   FL_XIP_WHILE_WRITING,
48  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49   FL_UNKNOWN
50  } flstate_t;
51  struct flchip {
52   unsigned long start;
53  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54   int ref_point_counter;
55   flstate_t state;
56   flstate_t oldstate;
57   unsigned int write_suspended:1;
58  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59   unsigned int erase_suspended:1;
60   unsigned long in_progress_block_addr;
61   spinlock_t *mutex;
62   spinlock_t _spinlock;
63  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64   wait_queue_head_t wq;
65   int word_write_time;
66   int buffer_write_time;
67   int erase_time;
68  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69   void *priv;
70  };
71  struct flchip_shared {
72   spinlock_t lock;
73  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74   struct flchip *writing;
75   struct flchip *erasing;
76  };
77  #endif
78  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79