projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nios2: link to CONFIG_SYS_MONITOR_BASE and remove text_base hook
[oweals/u-boot.git]
/
drivers
/
mtd
/
onenand
/
onenand_bbt.c
diff --git
a/drivers/mtd/onenand/onenand_bbt.c
b/drivers/mtd/onenand/onenand_bbt.c
index 1354877729d9aa8a8d4814b1a414b8c02687dfb3..52509f1ae9ab4747a80f14304b05231c9466ced1 100644
(file)
--- a/
drivers/mtd/onenand/onenand_bbt.c
+++ b/
drivers/mtd/onenand/onenand_bbt.c
@@
-15,7
+15,7
@@
*/
#include <common.h>
*/
#include <common.h>
-#include <linux/
mtd/
compat.h>
+#include <linux/compat.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/onenand.h>
#include <malloc.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/onenand.h>
#include <malloc.h>
@@
-87,7
+87,7
@@
static int create_bbt(struct mtd_info *mtd, uint8_t * buf,
startblock = 0;
from = 0;
startblock = 0;
from = 0;
- ops.mode = MTD_O
OB_PLACE
;
+ ops.mode = MTD_O
PS_PLACE_OOB
;
ops.ooblen = readlen;
ops.oobbuf = buf;
ops.len = ops.ooboffs = ops.retlen = ops.oobretlen = 0;
ops.ooblen = readlen;
ops.oobbuf = buf;
ops.len = ops.ooboffs = ops.retlen = ops.oobretlen = 0;
@@
-140,7
+140,6
@@
static inline int onenand_memory_bbt(struct mtd_info *mtd,
{
unsigned char data_buf[MAX_ONENAND_PAGESIZE];
{
unsigned char data_buf[MAX_ONENAND_PAGESIZE];
- bd->options &= ~NAND_BBT_SCANEMPTY;
return create_bbt(mtd, data_buf, bd, -1);
}
return create_bbt(mtd, data_buf, bd, -1);
}
@@
-200,10
+199,8
@@
int onenand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd)
len = this->chipsize >> (this->erase_shift + 2);
/* Allocate memory (2bit per block) */
bbm->bbt = malloc(len);
len = this->chipsize >> (this->erase_shift + 2);
/* Allocate memory (2bit per block) */
bbm->bbt = malloc(len);
- if (!bbm->bbt) {
- printk(KERN_ERR "onenand_scan_bbt: Out of memory\n");
+ if (!bbm->bbt)
return -ENOMEM;
return -ENOMEM;
- }
/* Clear the memory bad block table */
memset(bbm->bbt, 0x00, len);
/* Clear the memory bad block table */
memset(bbm->bbt, 0x00, len);