blob: 803772f59e23cf1b555f2ffbccf301fdb01e3e9b [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
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 ***
Ben Cheng654325d2012-03-07 21:13:49 -080010 *** 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 ***
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080017 ****************************************************************************
18 ****************************************************************************/
19#ifndef __LINUX_MTD_MAP_H__
20#define __LINUX_MTD_MAP_H__
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080021#include <linux/types.h>
22#include <linux/list.h>
Ben Cheng654325d2012-03-07 21:13:49 -080023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080024#include <linux/string.h>
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080025#include <linux/mtd/compatmac.h>
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080026#include <asm/unaligned.h>
27#include <asm/system.h>
Ben Cheng654325d2012-03-07 21:13:49 -080028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080029#include <asm/io.h>
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080030#define map_bankwidth_is_1(map) (0)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080031#define map_bankwidth_is_2(map) (0)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080032#define map_bankwidth_is_4(map) (0)
Ben Cheng654325d2012-03-07 21:13:49 -080033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080034#define map_calc_words(map) ((map_bankwidth(map) + (sizeof(unsigned long)-1))/ sizeof(unsigned long))
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080035#define map_bankwidth_is_8(map) (0)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080036#define map_bankwidth_is_16(map) (0)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080037#define map_bankwidth_is_32(map) (0)
Ben Cheng654325d2012-03-07 21:13:49 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080039#ifndef map_bankwidth
40#error "No bus width supported. What's the point?"
41#endif
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080042#define MAX_MAP_LONGS ( ((MAX_MAP_BANKWIDTH*8) + BITS_PER_LONG - 1) / BITS_PER_LONG )
Ben Cheng654325d2012-03-07 21:13:49 -080043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44typedef union {
45 unsigned long x[MAX_MAP_LONGS];
46} map_word;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080047struct map_info {
Ben Cheng654325d2012-03-07 21:13:49 -080048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080049 char *name;
50 unsigned long size;
51 unsigned long phys;
52#define NO_XIP (-1UL)
Ben Cheng654325d2012-03-07 21:13:49 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080054 void __iomem *virt;
55 void *cached;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080056 int bankwidth;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080057 void (*inval_cache)(struct map_info *, unsigned long, ssize_t);
Ben Cheng654325d2012-03-07 21:13:49 -080058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080059 void (*set_vpp)(struct map_info *, int);
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080060 unsigned long map_priv_1;
61 unsigned long map_priv_2;
62 void *fldrv_priv;
Ben Cheng654325d2012-03-07 21:13:49 -080063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080064 struct mtd_chip_driver *fldrv;
65};
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080066struct mtd_chip_driver {
67 struct mtd_info *(*probe)(struct map_info *map);
Ben Cheng654325d2012-03-07 21:13:49 -080068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080069 void (*destroy)(struct mtd_info *);
70 struct module *module;
71 char *name;
72 struct list_head list;
Ben Cheng654325d2012-03-07 21:13:49 -080073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080074};
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080075struct mtd_info *do_map_probe(const char *name, struct map_info *map);
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080076#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)
Ben Cheng654325d2012-03-07 21:13:49 -080078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080079#define INVALIDATE_CACHED_RANGE(map, from, size) do { if(map->inval_cache) map->inval_cache(map, from, size); } while(0)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080080#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
Ben Cheng654325d2012-03-07 21:13:49 -080083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080084#ifdef __LITTLE_ENDIAN
85#else
86#endif
87#if BITS_PER_LONG < 64
Ben Cheng654325d2012-03-07 21:13:49 -080088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080089#define MAP_FF_LIMIT 4
90#else
91#define MAP_FF_LIMIT 8
92#endif
Ben Cheng654325d2012-03-07 21:13:49 -080093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080094#if BITS_PER_LONG >= 64
95#endif
96#if BITS_PER_LONG >= 64
97#endif
Ben Cheng654325d2012-03-07 21:13:49 -080098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080099#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)
Ben Cheng654325d2012-03-07 21:13:49 -0800103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800104#define simple_map_init(map) BUG_ON(!map_bankwidth_supported((map)->bankwidth))
105#define map_is_linear(map) ({ (void)(map); 1; })
106#endif