]>
Commit | Line | Data |
---|---|---|
ac7eb8a3 | 1 | /* |
932394ac WD |
2 | * $Id: mtd.h,v 1.56 2004/08/09 18:46:04 dmarlin Exp $ |
3 | * | |
4 | * Copyright (C) 1999-2003 David Woodhouse <[email protected]> et al. | |
5 | * | |
6 | * Released under GPL | |
7 | */ | |
8 | ||
9 | #ifndef __MTD_MTD_H__ | |
10 | #define __MTD_MTD_H__ | |
11 | #include <linux/types.h> | |
12 | #include <linux/mtd/mtd-abi.h> | |
13 | ||
14 | #define MAX_MTD_DEVICES 16 | |
15 | ||
53677ef1 | 16 | #define MTD_ERASE_PENDING 0x01 |
932394ac WD |
17 | #define MTD_ERASING 0x02 |
18 | #define MTD_ERASE_SUSPEND 0x04 | |
19 | #define MTD_ERASE_DONE 0x08 | |
20 | #define MTD_ERASE_FAILED 0x10 | |
21 | ||
22 | /* If the erase fails, fail_addr might indicate exactly which block failed. If | |
23 | fail_addr = 0xffffffff, the failure was not at the device level or was not | |
24 | specific to any particular block. */ | |
25 | struct erase_info { | |
26 | struct mtd_info *mtd; | |
27 | u_int32_t addr; | |
28 | u_int32_t len; | |
29 | u_int32_t fail_addr; | |
30 | u_long time; | |
31 | u_long retries; | |
32 | u_int dev; | |
33 | u_int cell; | |
34 | void (*callback) (struct erase_info *self); | |
35 | u_long priv; | |
36 | u_char state; | |
37 | struct erase_info *next; | |
38 | }; | |
39 | ||
40 | struct mtd_erase_region_info { | |
41 | u_int32_t offset; /* At which this region starts, from the beginning of the MTD */ | |
42 | u_int32_t erasesize; /* For this region */ | |
43 | u_int32_t numblocks; /* Number of blocks of erasesize in this region */ | |
44 | }; | |
45 | ||
46 | struct mtd_info { | |
47 | u_char type; | |
48 | u_int32_t flags; | |
ac7eb8a3 | 49 | u_int32_t size; /* Total size of the MTD */ |
932394ac WD |
50 | |
51 |