diff options
Diffstat (limited to 'include/linux/mtd/map.h')
-rw-r--r-- | include/linux/mtd/map.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index 142963f01d29..fedfbc8a287f 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h | |||
@@ -1,6 +1,6 @@ | |||
1 | 1 | ||
2 | /* Overhauled routines for dealing with different mmap regions of flash */ | 2 | /* Overhauled routines for dealing with different mmap regions of flash */ |
3 | /* $Id: map.h,v 1.52 2005/05/25 10:29:41 gleixner Exp $ */ | 3 | /* $Id: map.h,v 1.54 2005/11/07 11:14:54 gleixner Exp $ */ |
4 | 4 | ||
5 | #ifndef __LINUX_MTD_MAP_H__ | 5 | #ifndef __LINUX_MTD_MAP_H__ |
6 | #define __LINUX_MTD_MAP_H__ | 6 | #define __LINUX_MTD_MAP_H__ |
@@ -8,7 +8,10 @@ | |||
8 | #include <linux/config.h> | 8 | #include <linux/config.h> |
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/list.h> | 10 | #include <linux/list.h> |
11 | #include <linux/string.h> | ||
12 | |||
11 | #include <linux/mtd/compatmac.h> | 13 | #include <linux/mtd/compatmac.h> |
14 | |||
12 | #include <asm/unaligned.h> | 15 | #include <asm/unaligned.h> |
13 | #include <asm/system.h> | 16 | #include <asm/system.h> |
14 | #include <asm/io.h> | 17 | #include <asm/io.h> |
@@ -167,14 +170,14 @@ typedef union { | |||
167 | to a chip probe routine -- either JEDEC or CFI probe or both -- via | 170 | to a chip probe routine -- either JEDEC or CFI probe or both -- via |
168 | do_map_probe(). If a chip is recognised, the probe code will invoke the | 171 | do_map_probe(). If a chip is recognised, the probe code will invoke the |
169 | appropriate chip driver (if present) and return a struct mtd_info. | 172 | appropriate chip driver (if present) and return a struct mtd_info. |
170 | At which point, you fill in the mtd->module with your own module | 173 | At which point, you fill in the mtd->module with your own module |
171 | address, and register it with the MTD core code. Or you could partition | 174 | address, and register it with the MTD core code. Or you could partition |
172 | it and register the partitions instead, or keep it for your own private | 175 | it and register the partitions instead, or keep it for your own private |
173 | use; whatever. | 176 | use; whatever. |
174 | 177 | ||
175 | The mtd->priv field will point to the struct map_info, and any further | 178 | The mtd->priv field will point to the struct map_info, and any further |
176 | private data required by the chip driver is linked from the | 179 | private data required by the chip driver is linked from the |
177 | mtd->priv->fldrv_priv field. This allows the map driver to get at | 180 | mtd->priv->fldrv_priv field. This allows the map driver to get at |
178 | the destructor function map->fldrv_destroy() when it's tired | 181 | the destructor function map->fldrv_destroy() when it's tired |
179 | of living. | 182 | of living. |
180 | */ | 183 | */ |
@@ -211,7 +214,7 @@ struct map_info { | |||
211 | If there is no cache to care about this can be set to NULL. */ | 214 | If there is no cache to care about this can be set to NULL. */ |
212 | void (*inval_cache)(struct map_info *, unsigned long, ssize_t); | 215 | void (*inval_cache)(struct map_info *, unsigned long, ssize_t); |
213 | 216 | ||
214 | /* set_vpp() must handle being reentered -- enable, enable, disable | 217 | /* set_vpp() must handle being reentered -- enable, enable, disable |
215 | must leave it enabled. */ | 218 | must leave it enabled. */ |
216 | void (*set_vpp)(struct map_info *, int); | 219 | void (*set_vpp)(struct map_info *, int); |
217 | 220 | ||
@@ -350,7 +353,7 @@ static inline map_word map_word_ff(struct map_info *map) | |||
350 | { | 353 | { |
351 | map_word r; | 354 | map_word r; |
352 | int i; | 355 | int i; |
353 | 356 | ||
354 | if (map_bankwidth(map) < MAP_FF_LIMIT) { | 357 | if (map_bankwidth(map) < MAP_FF_LIMIT) { |
355 | int bw = 8 * map_bankwidth(map); | 358 | int bw = 8 * map_bankwidth(map); |
356 | r.x[0] = (1 << bw) - 1; | 359 | r.x[0] = (1 << bw) - 1; |