diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/jffs2.h | 56 | ||||
| -rw-r--r-- | include/linux/jffs2_fs_i.h | 50 | ||||
| -rw-r--r-- | include/linux/jffs2_fs_sb.h | 122 | ||||
| -rw-r--r-- | include/linux/module.h | 9 | ||||
| -rw-r--r-- | include/linux/mtd/inftl.h | 2 | ||||
| -rw-r--r-- | include/linux/mtd/mtd.h | 97 | ||||
| -rw-r--r-- | include/linux/mtd/nand.h | 354 | ||||
| -rw-r--r-- | include/linux/mtd/ndfc.h | 67 | ||||
| -rw-r--r-- | include/linux/mtd/nftl.h | 2 | ||||
| -rw-r--r-- | include/linux/mtd/onenand.h | 11 | ||||
| -rw-r--r-- | include/linux/mtd/onenand_regs.h | 8 | ||||
| -rw-r--r-- | include/linux/mtd/partitions.h | 2 | ||||
| -rw-r--r-- | include/linux/mtd/physmap.h | 29 |
13 files changed, 417 insertions, 392 deletions
diff --git a/include/linux/jffs2.h b/include/linux/jffs2.h index cf792bb3c726..c6f70660b371 100644 --- a/include/linux/jffs2.h +++ b/include/linux/jffs2.h | |||
| @@ -65,6 +65,18 @@ | |||
| 65 | 65 | ||
| 66 | #define JFFS2_NODETYPE_SUMMARY (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 6) | 66 | #define JFFS2_NODETYPE_SUMMARY (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 6) |
| 67 | 67 | ||
| 68 | #define JFFS2_NODETYPE_XATTR (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 8) | ||
| 69 | #define JFFS2_NODETYPE_XREF (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 9) | ||
| 70 | |||
| 71 | /* XATTR Related */ | ||
| 72 | #define JFFS2_XPREFIX_USER 1 /* for "user." */ | ||
| 73 | #define JFFS2_XPREFIX_SECURITY 2 /* for "security." */ | ||
| 74 | #define JFFS2_XPREFIX_ACL_ACCESS 3 /* for "system.posix_acl_access" */ | ||
| 75 | #define JFFS2_XPREFIX_ACL_DEFAULT 4 /* for "system.posix_acl_default" */ | ||
| 76 | #define JFFS2_XPREFIX_TRUSTED 5 /* for "trusted.*" */ | ||
| 77 | |||
| 78 | #define JFFS2_ACL_VERSION 0x0001 | ||
| 79 | |||
| 68 | // Maybe later... | 80 | // Maybe later... |
| 69 | //#define JFFS2_NODETYPE_CHECKPOINT (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3) | 81 | //#define JFFS2_NODETYPE_CHECKPOINT (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3) |
| 70 | //#define JFFS2_NODETYPE_OPTIONS (JFFS2_FEATURE_RWCOMPAT_COPY | JFFS2_NODE_ACCURATE | 4) | 82 | //#define JFFS2_NODETYPE_OPTIONS (JFFS2_FEATURE_RWCOMPAT_COPY | JFFS2_NODE_ACCURATE | 4) |
| @@ -82,11 +94,11 @@ | |||
| 82 | 94 | ||
| 83 | typedef struct { | 95 | typedef struct { |
| 84 | uint32_t v32; | 96 | uint32_t v32; |
| 85 | } __attribute__((packed)) jint32_t; | 97 | } __attribute__((packed)) jint32_t; |
| 86 | 98 | ||
| 87 | typedef struct { | 99 | typedef struct { |
| 88 | uint32_t m; | 100 | uint32_t m; |
| 89 | } __attribute__((packed)) jmode_t; | 101 | } __attribute__((packed)) jmode_t; |
| 90 | 102 | ||
| 91 | typedef struct { | 103 | typedef struct { |
| 92 | uint16_t v16; | 104 | uint16_t v16; |
| @@ -99,7 +111,7 @@ struct jffs2_unknown_node | |||
| 99 | jint16_t nodetype; | 111 | jint16_t nodetype; |
| 100 | jint32_t totlen; /* So we can skip over nodes we don't grok */ | 112 | jint32_t totlen; /* So we can skip over nodes we don't grok */ |
| 101 | jint32_t hdr_crc; | 113 | jint32_t hdr_crc; |
| 102 | } __attribute__((packed)); | 114 | }; |
| 103 | 115 | ||
| 104 | struct jffs2_raw_dirent | 116 | struct jffs2_raw_dirent |
| 105 | { | 117 | { |
| @@ -117,7 +129,7 @@ struct jffs2_raw_dirent | |||
| 117 | jint32_t node_crc; | 129 | jint32_t node_crc; |
| 118 | jint32_t name_crc; | 130 | jint32_t name_crc; |
| 119 | uint8_t name[0]; | 131 | uint8_t name[0]; |
| 120 | } __attribute__((packed)); | 132 | }; |
| 121 | 133 | ||
| 122 | /* The JFFS2 raw inode structure: Used for storage on physical media. */ | 134 | /* The JFFS2 raw inode structure: Used for storage on physical media. */ |
| 123 | /* The uid, gid, atime, mtime and ctime members could be longer, but | 135 | /* The uid, gid, atime, mtime and ctime members could be longer, but |
| @@ -149,6 +161,32 @@ struct jffs2_raw_inode | |||
| 149 | jint32_t data_crc; /* CRC for the (compressed) data. */ | 161 | jint32_t data_crc; /* CRC for the (compressed) data. */ |
| 150 | jint32_t node_crc; /* CRC for the raw inode (excluding data) */ | 162 | jint32_t node_crc; /* CRC for the raw inode (excluding data) */ |
| 151 | uint8_t data[0]; | 163 | uint8_t data[0]; |
| 164 | }; | ||
| 165 | |||
| 166 | struct jffs2_raw_xattr { | ||
| 167 | jint16_t magic; | ||
| 168 | jint16_t nodetype; /* = JFFS2_NODETYPE_XATTR */ | ||
| 169 | jint32_t totlen; | ||
| 170 | jint32_t hdr_crc; | ||
| 171 | jint32_t xid; /* XATTR identifier number */ | ||
| 172 | jint32_t version; | ||
| 173 | uint8_t xprefix; | ||
| 174 | uint8_t name_len; | ||
| 175 | jint16_t value_len; | ||
| 176 | jint32_t data_crc; | ||
| 177 | jint32_t node_crc; | ||
| 178 | uint8_t data[0]; | ||
| 179 | } __attribute__((packed)); | ||
| 180 | |||
| 181 | struct jffs2_raw_xref | ||
| 182 | { | ||
| 183 | jint16_t magic; | ||
| 184 | jint16_t nodetype; /* = JFFS2_NODETYPE_XREF */ | ||
| 185 | jint32_t totlen; | ||
| 186 | jint32_t hdr_crc; | ||
| 187 | jint32_t ino; /* inode number */ | ||
| 188 | jint32_t xid; /* XATTR identifier number */ | ||
| 189 | jint32_t node_crc; | ||
| 152 | } __attribute__((packed)); | 190 | } __attribute__((packed)); |
| 153 | 191 | ||
| 154 | struct jffs2_raw_summary | 192 | struct jffs2_raw_summary |
| @@ -163,14 +201,22 @@ struct jffs2_raw_summary | |||
| 163 | jint32_t sum_crc; /* summary information crc */ | 201 | jint32_t sum_crc; /* summary information crc */ |
| 164 | jint32_t node_crc; /* node crc */ | 202 | jint32_t node_crc; /* node crc */ |
| 165 | jint32_t sum[0]; /* inode summary info */ | 203 | jint32_t sum[0]; /* inode summary info */ |
| 166 | } __attribute__((packed)); | 204 | }; |
| 167 | 205 | ||
| 168 | union jffs2_node_union | 206 | union jffs2_node_union |
| 169 | { | 207 | { |
| 170 | struct jffs2_raw_inode i; | 208 | struct jffs2_raw_inode i; |
| 171 | struct jffs2_raw_dirent d; | 209 | struct jffs2_raw_dirent d; |
| 210 | struct jffs2_raw_xattr x; | ||
| 211 | struct jffs2_raw_xref r; | ||
| 172 | struct jffs2_raw_summary s; | 212 | struct jffs2_raw_summary s; |
| 173 | struct jffs2_unknown_node u; | 213 | struct jffs2_unknown_node u; |
| 174 | }; | 214 | }; |
| 175 | 215 | ||
| 216 | /* Data payload for device nodes. */ | ||
| 217 | union jffs2_device_node { | ||
| 218 | jint16_t old; | ||
| 219 | jint32_t new; | ||
| 220 | }; | ||
| 221 | |||
| 176 | #endif /* __LINUX_JFFS2_H__ */ | 222 | #endif /* __LINUX_JFFS2_H__ */ |
diff --git a/include/linux/jffs2_fs_i.h b/include/linux/jffs2_fs_i.h deleted file mode 100644 index ad565bf9dcc1..000000000000 --- a/include/linux/jffs2_fs_i.h +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | /* $Id: jffs2_fs_i.h,v 1.19 2005/11/07 11:14:52 gleixner Exp $ */ | ||
| 2 | |||
| 3 | #ifndef _JFFS2_FS_I | ||
| 4 | #define _JFFS2_FS_I | ||
| 5 | |||
| 6 | #include <linux/version.h> | ||
| 7 | #include <linux/rbtree.h> | ||
| 8 | #include <asm/semaphore.h> | ||
| 9 | |||
| 10 | struct jffs2_inode_info { | ||
| 11 | /* We need an internal mutex similar to inode->i_mutex. | ||
| 12 | Unfortunately, we can't used the existing one, because | ||
| 13 | either the GC would deadlock, or we'd have to release it | ||
| 14 | before letting GC proceed. Or we'd have to put ugliness | ||
| 15 | into the GC code so it didn't attempt to obtain the i_mutex | ||
| 16 | for the inode(s) which are already locked */ | ||
| 17 | struct semaphore sem; | ||
| 18 | |||
| 19 | /* The highest (datanode) version number used for this ino */ | ||
| 20 | uint32_t highest_version; | ||
| 21 | |||
| 22 | /* List of data fragments which make up the file */ | ||
| 23 | struct rb_root fragtree; | ||
| 24 | |||
| 25 | /* There may be one datanode which isn't referenced by any of the | ||
| 26 | above fragments, if it contains a metadata update but no actual | ||
| 27 | data - or if this is a directory inode */ | ||
| 28 | /* This also holds the _only_ dnode for symlinks/device nodes, | ||
| 29 | etc. */ | ||
| 30 | struct jffs2_full_dnode *metadata; | ||
| 31 | |||
| 32 | /* Directory entries */ | ||
| 33 | struct jffs2_full_dirent *dents; | ||
| 34 | |||
| 35 | /* The target path if this is the inode of a symlink */ | ||
| 36 | unsigned char *target; | ||
| 37 | |||
| 38 | /* Some stuff we just have to keep in-core at all times, for each inode. */ | ||
| 39 | struct jffs2_inode_cache *inocache; | ||
| 40 | |||
| 41 | uint16_t flags; | ||
| 42 | uint8_t usercompr; | ||
| 43 | #if !defined (__ECOS) | ||
| 44 | #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,2) | ||
| 45 | struct inode vfs_inode; | ||
| 46 | #endif | ||
| 47 | #endif | ||
| 48 | }; | ||
| 49 | |||
| 50 | #endif /* _JFFS2_FS_I */ | ||
diff --git a/include/linux/jffs2_fs_sb.h b/include/linux/jffs2_fs_sb.h deleted file mode 100644 index 4bcfb5570221..000000000000 --- a/include/linux/jffs2_fs_sb.h +++ /dev/null | |||
| @@ -1,122 +0,0 @@ | |||
| 1 | /* $Id: jffs2_fs_sb.h,v 1.54 2005/09/21 13:37:34 dedekind Exp $ */ | ||
| 2 | |||
| 3 | #ifndef _JFFS2_FS_SB | ||
| 4 | #define _JFFS2_FS_SB | ||
| 5 | |||
| 6 | #include <linux/types.h> | ||
| 7 | #include <linux/spinlock.h> | ||
| 8 | #include <linux/workqueue.h> | ||
| 9 | #include <linux/completion.h> | ||
| 10 | #include <asm/semaphore.h> | ||
| 11 | #include <linux/timer.h> | ||
| 12 | #include <linux/wait.h> | ||
| 13 | #include <linux/list.h> | ||
| 14 | #include <linux/rwsem.h> | ||
| 15 | |||
| 16 | #define JFFS2_SB_FLAG_RO 1 | ||
| 17 | #define JFFS2_SB_FLAG_SCANNING 2 /* Flash scanning is in progress */ | ||
| 18 | #define JFFS2_SB_FLAG_BUILDING 4 /* File system building is in progress */ | ||
