diff options
author | Kyungmin Park <kyungmin.park@samsung.com> | 2006-09-26 05:45:28 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-09-26 11:46:28 -0400 |
commit | 28b79ff9661b22e4c41c0d00d4ab8503e810f13d (patch) | |
tree | 4c5bc7711b52ec2ca569d8250de09b8b5b82fb7a /include/linux/mtd | |
parent | 98638ee2edf86b80cf89486c4aabcd9ce471a54a (diff) |
[MTD ONENAND] Check OneNAND lock scheme & all block unlock command support
OneNAND lock scheme depends on density and process of chip.
Some OneNAND chips support all block unlock
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r-- | include/linux/mtd/onenand.h | 6 | ||||
-rw-r--r-- | include/linux/mtd/onenand_regs.h | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index 1f4972155249..6f045b586e76 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/linux/mtd/onenand.h | 2 | * linux/include/linux/mtd/onenand.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Samsung Electronics | 4 | * Copyright (C) 2005-2006 Samsung Electronics |
5 | * Kyungmin Park <kyungmin.park@samsung.com> | 5 | * Kyungmin Park <kyungmin.park@samsung.com> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
@@ -96,6 +96,7 @@ struct onenand_chip { | |||
96 | void __iomem *base; | 96 | void __iomem *base; |
97 | unsigned int chipsize; | 97 | unsigned int chipsize; |
98 | unsigned int device_id; | 98 | unsigned int device_id; |
99 | unsigned int version_id; | ||
99 | unsigned int density_mask; | 100 | unsigned int density_mask; |
100 | unsigned int options; | 101 | unsigned int options; |
101 | 102 | ||
@@ -149,7 +150,8 @@ struct onenand_chip { | |||
149 | /* | 150 | /* |
150 | * Options bits | 151 | * Options bits |
151 | */ | 152 | */ |
152 | #define ONENAND_CONT_LOCK (0x0001) | 153 | #define ONENAND_HAS_CONT_LOCK (0x0001) |
154 | #define ONENAND_HAS_UNLOCK_ALL (0x0002) | ||
153 | #define ONENAND_PAGEBUF_ALLOC (0x1000) | 155 | #define ONENAND_PAGEBUF_ALLOC (0x1000) |
154 | 156 | ||
155 | /* | 157 | /* |
diff --git a/include/linux/mtd/onenand_regs.h b/include/linux/mtd/onenand_regs.h index 4a72818d2545..9e409fe6ded6 100644 --- a/include/linux/mtd/onenand_regs.h +++ b/include/linux/mtd/onenand_regs.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * OneNAND Register header file | 4 | * OneNAND Register header file |
5 | * | 5 | * |
6 | * Copyright (C) 2005 Samsung Electronics | 6 | * Copyright (C) 2005-2006 Samsung Electronics |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
@@ -72,6 +72,7 @@ | |||
72 | #define ONENAND_DEVICE_VCC_MASK (0x3) | 72 | #define ONENAND_DEVICE_VCC_MASK (0x3) |
73 | 73 | ||
74 | #define ONENAND_DEVICE_DENSITY_512Mb (0x002) | 74 | #define ONENAND_DEVICE_DENSITY_512Mb (0x002) |
75 | #define ONENAND_DEVICE_DENSITY_1Gb (0x003) | ||
75 | 76 | ||
76 | /* | 77 | /* |
77 | * Version ID Register F002h (R) | 78 | * Version ID Register F002h (R) |
@@ -110,6 +111,7 @@ | |||
110 | #define ONENAND_CMD_UNLOCK (0x23) | 111 | #define ONENAND_CMD_UNLOCK (0x23) |
111 | #define ONENAND_CMD_LOCK (0x2A) | 112 | #define ONENAND_CMD_LOCK (0x2A) |
112 | #define ONENAND_CMD_LOCK_TIGHT (0x2C) | 113 | #define ONENAND_CMD_LOCK_TIGHT (0x2C) |
114 | #define ONENAND_CMD_UNLOCK_ALL (0x27) | ||
113 | #define ONENAND_CMD_ERASE (0x94) | 115 | #define ONENAND_CMD_ERASE (0x94) |
114 | #define ONENAND_CMD_RESET (0xF0) | 116 | #define ONENAND_CMD_RESET (0xF0) |
115 | #define ONENAND_CMD_OTP_ACCESS (0x65) | 117 | #define ONENAND_CMD_OTP_ACCESS (0x65) |