diff options
author | Adrian Hunter <ext-adrian.hunter@nokia.com> | 2007-01-31 10:19:28 -0500 |
---|---|---|
committer | Kyungmin Park <kyungmin.park@samsung.com> | 2007-01-31 19:28:18 -0500 |
commit | a5e7c7b447270d42c3eb4d2259f74019aca9d007 (patch) | |
tree | b454389e425b43c36d23a579e5e2da55ab3f2b00 /drivers/mtd/onenand/onenand_bbt.c | |
parent | 9bfbc9b24f663b15149874a94a69ba89b3b7e44c (diff) |
[MTD] OneNAND: Add support for auto-placement of out-of-band data
Enable the use of oob operation mode MTD_OOB_AUTO with OneNAND.
Note that MTD_OOB_RAW is still not supported.
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/mtd/onenand/onenand_bbt.c')
-rw-r--r-- | drivers/mtd/onenand/onenand_bbt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c index aa46b7f6f496..acea9a1a7297 100644 --- a/drivers/mtd/onenand/onenand_bbt.c +++ b/drivers/mtd/onenand/onenand_bbt.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/mtd/compatmac.h> | 18 | #include <linux/mtd/compatmac.h> |
19 | 19 | ||
20 | extern int onenand_do_read_oob(struct mtd_info *mtd, loff_t from, size_t len, | 20 | extern int onenand_do_read_oob(struct mtd_info *mtd, loff_t from, size_t len, |
21 | size_t *retlen, u_char *buf); | 21 | size_t *retlen, u_char *buf, mtd_oob_mode_t mode); |
22 | 22 | ||
23 | /** | 23 | /** |
24 | * check_short_pattern - [GENERIC] check if a pattern is in the buffer | 24 | * check_short_pattern - [GENERIC] check if a pattern is in the buffer |
@@ -91,7 +91,7 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr | |||
91 | /* No need to read pages fully, | 91 | /* No need to read pages fully, |
92 | * just read required OOB bytes */ | 92 | * just read required OOB bytes */ |
93 | ret = onenand_do_read_oob(mtd, from + j * mtd->writesize + bd->offs, | 93 | ret = onenand_do_read_oob(mtd, from + j * mtd->writesize + bd->offs, |
94 | readlen, &retlen, &buf[0]); | 94 | readlen, &retlen, &buf[0], MTD_OOB_PLACE); |
95 | 95 | ||
96 | /* If it is a initial bad block, just ignore it */ | 96 | /* If it is a initial bad block, just ignore it */ |
97 | if (ret && !(ret & ONENAND_CTRL_LOAD)) | 97 | if (ret && !(ret & ONENAND_CTRL_LOAD)) |