• 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 __LINUX_MTD_MAP_H__
20 #define __LINUX_MTD_MAP_H__
21 #include <linux/types.h>
22 #include <linux/list.h>
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #include <linux/string.h>
25 #include <linux/mtd/compatmac.h>
26 #include <asm/unaligned.h>
27 #include <asm/system.h>
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #include <asm/io.h>
30 #define map_bankwidth_is_1(map) (0)
31 #define map_bankwidth_is_2(map) (0)
32 #define map_bankwidth_is_4(map) (0)
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #define map_calc_words(map) ((map_bankwidth(map) + (sizeof(unsigned long)-1))/ sizeof(unsigned long))
35 #define map_bankwidth_is_8(map) (0)
36 #define map_bankwidth_is_16(map) (0)
37 #define map_bankwidth_is_32(map) (0)
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 #ifndef map_bankwidth
40 #error "No bus width supported. What's the point?"
41 #endif
42 #define MAX_MAP_LONGS ( ((MAX_MAP_BANKWIDTH*8) + BITS_PER_LONG - 1) / BITS_PER_LONG )
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 typedef union {
45  unsigned long x[MAX_MAP_LONGS];
46 } map_word;
47 struct map_info {
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49  char *name;
50  unsigned long size;
51  unsigned long phys;
52 #define NO_XIP (-1UL)
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54  void __iomem *virt;
55  void *cached;
56  int bankwidth;
57  void (*inval_cache)(struct map_info *, unsigned long, ssize_t);
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59  void (*set_vpp)(struct map_info *, int);
60  unsigned long map_priv_1;
61  unsigned long map_priv_2;
62  void *fldrv_priv;
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64  struct mtd_chip_driver *fldrv;
65 };
66 struct mtd_chip_driver {
67  struct mtd_info *(*probe)(struct map_info *map);
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69  void (*destroy)(struct mtd_info *);
70  struct module *module;
71  char *name;
72  struct list_head list;
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 };
75 struct mtd_info *do_map_probe(const char *name, struct map_info *map);
76 #define ENABLE_VPP(map) do { if(map->set_vpp) map->set_vpp(map, 1); } while(0)
77 #define DISABLE_VPP(map) do { if(map->set_vpp) map->set_vpp(map, 0); } while(0)
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 #define INVALIDATE_CACHED_RANGE(map, from, size)   do { if(map->inval_cache) map->inval_cache(map, from, size); } while(0)
80 #define map_word_andequal(m, a, b, z) map_word_equal(m, z, map_word_and(m, a, b))
81 #if BITS_PER_LONG >= 64
82 #endif
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 #ifdef __LITTLE_ENDIAN
85 #else
86 #endif
87 #if BITS_PER_LONG < 64
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 #define MAP_FF_LIMIT 4
90 #else
91 #define MAP_FF_LIMIT 8
92 #endif
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 #if BITS_PER_LONG >= 64
95 #endif
96 #if BITS_PER_LONG >= 64
97 #endif
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 #define map_read(map, ofs) inline_map_read(map, ofs)
100 #define map_copy_from(map, to, from, len) inline_map_copy_from(map, to, from, len)
101 #define map_write(map, datum, ofs) inline_map_write(map, datum, ofs)
102 #define map_copy_to(map, to, from, len) inline_map_copy_to(map, to, from, len)
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 #define simple_map_init(map) BUG_ON(!map_bankwidth_supported((map)->bankwidth))
105 #define map_is_linear(map) ({ (void)(map); 1; })
106 #endif
107