diff options
| author | Steve French <sfrench@us.ibm.com> | 2008-05-06 13:55:32 -0400 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2008-05-06 13:55:32 -0400 |
| commit | a815752ac0ffdb910e92958d41d28f4fb28e5296 (patch) | |
| tree | a3aa16a282354da0debe8e3a3a7ed8aac6e54001 /include/linux/mtd | |
| parent | 5ade9deaaa3e1f7291467d97b238648e43eae15e (diff) | |
| parent | a15306365a16380f3bafee9e181ba01231d4acd7 (diff) | |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/linux/mtd')
| -rw-r--r-- | include/linux/mtd/jedec.h | 66 | ||||
| -rw-r--r-- | include/linux/mtd/mtd.h | 6 | ||||
| -rw-r--r-- | include/linux/mtd/pmc551.h | 5 |
3 files changed, 7 insertions, 70 deletions
diff --git a/include/linux/mtd/jedec.h b/include/linux/mtd/jedec.h deleted file mode 100644 index 9006feb218b9..000000000000 --- a/include/linux/mtd/jedec.h +++ /dev/null | |||
| @@ -1,66 +0,0 @@ | |||
| 1 | |||
| 2 | /* JEDEC Flash Interface. | ||
| 3 | * This is an older type of interface for self programming flash. It is | ||
| 4 | * commonly use in older AMD chips and is obsolete compared with CFI. | ||
| 5 | * It is called JEDEC because the JEDEC association distributes the ID codes | ||
| 6 | * for the chips. | ||
| 7 | * | ||
| 8 | * See the AMD flash databook for information on how to operate the interface. | ||
| 9 | * | ||
| 10 | * $Id: jedec.h,v 1.4 2005/11/07 11:14:54 gleixner Exp $ | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __LINUX_MTD_JEDEC_H__ | ||
| 14 | #define __LINUX_MTD_JEDEC_H__ | ||
| 15 | |||
| 16 | #include <linux/types.h> | ||
| 17 | |||
| 18 | #define MAX_JEDEC_CHIPS 16 | ||
| 19 | |||
| 20 | // Listing of all supported chips and their information | ||
| 21 | struct JEDECTable | ||
| 22 | { | ||
| 23 | __u16 jedec; | ||
| 24 | char *name; | ||
| 25 | unsigned long size; | ||
| 26 | unsigned long sectorsize; | ||
| 27 | __u32 capabilities; | ||
| 28 | }; | ||
| 29 | |||
| 30 | // JEDEC being 0 is the end of the chip array | ||
| 31 | struct jedec_flash_chip | ||
| 32 | { | ||
| 33 | __u16 jedec; | ||
| 34 | unsigned long size; | ||
| 35 | unsigned long sectorsize; | ||
| 36 | |||
| 37 | // *(__u8*)(base + (adder << addrshift)) = data << datashift | ||
| 38 | // Address size = size << addrshift | ||
| 39 | unsigned long base; // Byte 0 of the flash, will be unaligned | ||
| 40 | unsigned int datashift; // Useful for 32bit/16bit accesses | ||
| 41 | unsigned int addrshift; | ||
| 42 | unsigned long offset; // linerized start. base==offset for unbanked, uninterleaved flash | ||
| 43 | |||
| 44 | __u32 capabilities; | ||
| 45 | |||
| 46 | // These markers are filled in by the flash_chip_scan function | ||
| 47 | unsigned long start; | ||
| 48 | unsigned long length; | ||
| 49 | }; | ||
| 50 | |||
| 51 | struct jedec_private | ||
| 52 | { | ||
| 53 | unsigned long size; // Total size of all the devices | ||
| 54 | |||
| 55 | /* Bank handling. If sum(bank_fill) == size then this is linear flash. | ||
| 56 | Otherwise the mapping has holes in it. bank_fill may be used to | ||
| 57 | find the holes, but in the common symetric case | ||
| 58 | bank_fill[0] == bank_fill[*], thus addresses may be computed | ||
| 59 | mathmatically. bank_fill must be powers of two */ | ||
| 60 | unsigned is_banked; | ||
| 61 | unsigned long bank_fill[MAX_JEDEC_CHIPS]; | ||
| 62 | |||
| 63 | struct jedec_flash_chip chips[MAX_JEDEC_CHIPS]; | ||
| 64 | }; | ||
| 65 | |||
| 66 | #endif | ||
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 0a13bb35f044..245f9098e171 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
| @@ -143,10 +143,12 @@ struct mtd_info { | |||
| 143 | int (*erase) (struct mtd_info *mtd, struct erase_info *instr); | 143 | int (*erase) (struct mtd_info *mtd, struct erase_info *instr); |
| 144 | 144 | ||
| 145 | /* This stuff for eXecute-In-Place */ | 145 | /* This stuff for eXecute-In-Place */ |
| 146 | int (*point) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf); | 146 | /* phys is optional and may be set to NULL */ |
| 147 | int (*point) (struct mtd_info *mtd, loff_t from, size_t len, | ||
| 148 | size_t *retlen, void **virt, resource_size_t *phys); | ||
| 147 | 149 | ||
| 148 | /* We probably shouldn't allow XIP if the unpoint isn't a NULL */ | 150 | /* We probably shouldn't allow XIP if the unpoint isn't a NULL */ |
| 149 | void (*unpoint) (struct mtd_info *mtd, u_char * addr, loff_t from, size_t len); | 151 | void (*unpoint) (struct mtd_info *mtd, loff_t from, size_t len); |
| 150 | 152 | ||
| 151 | 153 | ||
| 152 | int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); | 154 | int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); |
diff --git a/include/linux/mtd/pmc551.h b/include/linux/mtd/pmc551.h index a7f6d20ad407..5cc070c24d88 100644 --- a/include/linux/mtd/pmc551.h +++ b/include/linux/mtd/pmc551.h | |||
| @@ -36,8 +36,9 @@ struct mypriv { | |||
| 36 | * Function Prototypes | 36 | * Function Prototypes |
| 37 | */ | 37 | */ |
| 38 | static int pmc551_erase(struct mtd_info *, struct erase_info *); | 38 | static int pmc551_erase(struct mtd_info *, struct erase_info *); |
| 39 | static void pmc551_unpoint(struct mtd_info *, u_char *, loff_t, size_t); | 39 | static void pmc551_unpoint(struct mtd_info *, loff_t, size_t); |
| 40 | static int pmc551_point (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf); | 40 | static int pmc551_point(struct mtd_info *mtd, loff_t from, size_t len, |
| 41 | size_t *retlen, void **virt, resource_size_t *phys); | ||
| 41 | static int pmc551_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *); | 42 | static int pmc551_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *); |
| 42 | static int pmc551_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); | 43 | static int pmc551_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); |
| 43 | 44 | ||
