aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-07 13:20:31 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-07 13:20:31 -0500
commita8e98d6d51a3eb7bb061b1625193a129c8bd094f (patch)
tree0fa58b6e11e37023b024e55b8f0e7e01438706d4 /include/linux
parentf0f1b3364ae7f48084bdf2837fb979ff59622523 (diff)
parentf9f7dd222364a6428d2ad99a515935dd1dd89d18 (diff)
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (120 commits) [MTD] Fix mtdoops.c compilation [MTD] [NOR] fix startup lock when using multiple nor flash chips [MTD] [DOC200x] eccbuf is statically defined and always evaluate to true [MTD] Fix maps/physmap.c compilation with CONFIG_PM [MTD] onenand: Add panic_write function to the onenand driver [MTD] mtdoops: Use the panic_write function when present [MTD] Add mtd panic_write function pointer [MTD] [NAND] Freescale enhanced Local Bus Controller FCM NAND support. [MTD] physmap.c: Add support for multiple resources [MTD] [NAND] Fix misparenthesization introduced by commit 78b65179... [MTD] [NAND] Fix Blackfin NFC ECC calculating bug with page size 512 bytes [MTD] [NAND] Remove wrong operation in PM function of the BF54x NFC driver [MTD] [NAND] Remove unused variable in plat_nand_remove [MTD] Unlocking all Intel flash that is locked on power up. [MTD] [NAND] at91_nand: Make mtdparts option can override board info [MTD] mtdoops: Various minor cleanups [MTD] mtdoops: Ensure sequential write to the buffer [MTD] mtdoops: Perform write operations in a workqueue [MTD] mtdoops: Add further error return code checking [MTD] [NOR] Test devtype, not definition in flash_probe(), drivers/mtd/devices/lart.c ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mtd/cfi.h12
-rw-r--r--include/linux/mtd/mtd.h9
-rw-r--r--include/linux/mtd/mtdram.h8
-rw-r--r--include/linux/mtd/onenand_regs.h1
-rw-r--r--include/linux/mtd/partitions.h9
-rw-r--r--include/linux/mtd/ubi.h18
6 files changed, 39 insertions, 18 deletions
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h
index e17c5343cf51..b0ddf4b25862 100644
--- a/include/linux/mtd/cfi.h
+++ b/include/linux/mtd/cfi.h
@@ -98,6 +98,18 @@ static inline int cfi_interleave_supported(int i)
98#define CFI_DEVICETYPE_X32 (32 / 8) 98#define CFI_DEVICETYPE_X32 (32 / 8)
99#define CFI_DEVICETYPE_X64 (64 / 8) 99#define CFI_DEVICETYPE_X64 (64 / 8)
100 100
101
102/* Device Interface Code Assignments from the "Common Flash Memory Interface
103 * Publication 100" dated December 1, 2001.
104 */
105#define CFI_INTERFACE_X8_ASYNC 0x0000
106#define CFI_INTERFACE_X16_ASYNC 0x0001
107#define CFI_INTERFACE_X8_BY_X16_ASYNC 0x0002
108#define CFI_INTERFACE_X32_ASYNC 0x0003
109#define CFI_INTERFACE_X16_BY_X32_ASYNC 0x0005
110#define CFI_INTERFACE_NOT_ALLOWED 0xffff
111
112
101/* NB: We keep these structures in memory in HOST byteorder, except 113/* NB: We keep these structures in memory in HOST byteorder, except
102 * where individually noted. 114 * where individually noted.
103 */ 115 */
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 783fc983417c..0a13bb35f044 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -152,6 +152,15 @@ struct mtd_info {
152 int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); 152 int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
153 int (*write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf); 153 int (*write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf);
154 154
155 /* In blackbox flight recorder like scenarios we want to make successful
156 writes in interrupt context. panic_write() is only intended to be
157 called when its known the kernel is about to panic and we need the
158 write to succeed. Since the kernel is not going to be running for much
159 longer, this function can break locks and delay to ensure the write
160 succeeds (but not sleep). */
161
162 int (*panic_write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf);
163
155 int (*read_oob) (struct mtd_info *mtd, loff_t from, 164 int (*read_oob) (struct mtd_info *mtd, loff_t from,
156 struct mtd_oob_ops *ops); 165 struct mtd_oob_ops *ops);
157 int (*write_oob) (struct mtd_info *mtd, loff_t to, 166 int (*write_oob) (struct mtd_info *mtd, loff_t to,
diff --git a/include/linux/mtd/mtdram.h b/include/linux/mtd/mtdram.h
new file mode 100644
index 000000000000..04fdc07b7353
--- /dev/null
+++ b/include/linux/mtd/mtdram.h
@@ -0,0 +1,8 @@
1#ifndef __MTD_MTDRAM_H__
2#define __MTD_MTDRAM_H__
3
4#include <linux/mtd/mtd.h>
5int mtdram_init_device(struct mtd_info *mtd, void *mapped_address,
6 unsigned long size, char *name);
7
8#endif /* __MTD_MTDRAM_H__ */
diff --git a/include/linux/mtd/onenand_regs.h b/include/linux/mtd/onenand_regs.h
index c46161f4eee3..d1b310c92eb4 100644
--- a/include/linux/mtd/onenand_regs.h
+++ b/include/linux/mtd/onenand_regs.h
@@ -67,6 +67,7 @@
67/* 67/*
68 * Device ID Register F001h (R) 68 * Device ID Register F001h (R)
69 */ 69 */
70#define ONENAND_DEVICE_DENSITY_MASK (0xf)
70#define ONENAND_DEVICE_DENSITY_SHIFT (4) 71#define ONENAND_DEVICE_DENSITY_SHIFT (4)
71#define ONENAND_DEVICE_IS_DDP (1 << 3) 72#define ONENAND_DEVICE_IS_DDP (1 << 3)
72#define ONENAND_DEVICE_IS_DEMUX (1 << 2) 73#define ONENAND_DEVICE_IS_DEMUX (1 << 2)
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h
index da6b3d6f12a7..7c37d7e55abc 100644
--- a/include/linux/mtd/partitions.h
+++ b/include/linux/mtd/partitions.h
@@ -71,5 +71,12 @@ extern int parse_mtd_partitions(struct mtd_info *master, const char **types,
71 71
72#define put_partition_parser(p) do { module_put((p)->owner); } while(0) 72#define put_partition_parser(p) do { module_put((p)->owner); } while(0)
73 73
74#endif 74struct device;
75struct device_node;
76
77int __devinit of_mtd_parse_partitions(struct device *dev,
78 struct mtd_info *mtd,
79 struct device_node *node,
80 struct mtd_partition **pparts);
75 81
82#endif
diff --git a/include/linux/mtd/ubi.h b/include/linux/mtd/ubi.h
index 3d967b6b120a..f71201d0f3e7 100644
--- a/include/linux/mtd/ubi.h
+++ b/include/linux/mtd/ubi.h
@@ -26,23 +26,6 @@
26#include <mtd/ubi-user.h> 26#include <mtd/ubi-user.h>
27 27
28/* 28/*
29 * UBI data type hint constants.
30 *
31 * UBI_LONGTERM: long-term data
32 * UBI_SHORTTERM: short-term data
33 * UBI_UNKNOWN: data persistence is unknown
34 *
35 * These constants are used when data is written to UBI volumes in order to
36 * help the UBI wear-leveling unit to find more appropriate physical
37 * eraseblocks.
38 */
39enum {
40 UBI_LONGTERM = 1,
41 UBI_SHORTTERM,
42 UBI_UNKNOWN
43};
44
45/*
46 * enum ubi_open_mode - UBI volume open mode constants. 29 * enum ubi_open_mode - UBI volume open mode constants.
47 * 30 *
48 * UBI_READONLY: read-only mode 31 * UBI_READONLY: read-only mode
@@ -167,6 +150,7 @@ int ubi_leb_change(struct ubi_volume_desc *desc, int lnum, const void *buf,
167 int len, int dtype); 150 int len, int dtype);
168int ubi_leb_erase(struct ubi_volume_desc *desc, int lnum); 151int ubi_leb_erase(struct ubi_volume_desc *desc, int lnum);
169int ubi_leb_unmap(struct ubi_volume_desc *desc, int lnum); 152int ubi_leb_unmap(struct ubi_volume_desc *desc, int lnum);
153int ubi_leb_map(struct ubi_volume_desc *desc, int lnum, int dtype);
170int ubi_is_mapped(struct ubi_volume_desc *desc, int lnum); 154int ubi_is_mapped(struct ubi_volume_desc *desc, int lnum);
171 155
172/* 156/*