Commit 8fa7a41f authored by David Woodhouse's avatar David Woodhouse
parents abb536e7 0fc2ccea
This diff is collapsed.
...@@ -93,7 +93,8 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr ...@@ -93,7 +93,8 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr
ret = onenand_do_read_oob(mtd, from + j * mtd->writesize + bd->offs, ret = onenand_do_read_oob(mtd, from + j * mtd->writesize + bd->offs,
readlen, &retlen, &buf[0]); readlen, &retlen, &buf[0]);
if (ret) /* If it is a initial bad block, just ignore it */
if (ret && !(ret & ONENAND_CTRL_LOAD))
return ret; return ret;
if (check_short_pattern(&buf[j * scanlen], scanlen, mtd->writesize, bd)) { if (check_short_pattern(&buf[j * scanlen], scanlen, mtd->writesize, bd)) {
......
...@@ -88,6 +88,7 @@ struct onenand_bufferram { ...@@ -88,6 +88,7 @@ struct onenand_bufferram {
* operation is in progress * operation is in progress
* @state: [INTERN] the current state of the OneNAND device * @state: [INTERN] the current state of the OneNAND device
* @page_buf: data buffer * @page_buf: data buffer
* @subpagesize: [INTERN] holds the subpagesize
* @ecclayout: [REPLACEABLE] the default ecc placement scheme * @ecclayout: [REPLACEABLE] the default ecc placement scheme
* @bbm: [REPLACEABLE] pointer to Bad Block Management * @bbm: [REPLACEABLE] pointer to Bad Block Management
* @priv: [OPTIONAL] pointer to private chip date * @priv: [OPTIONAL] pointer to private chip date
...@@ -128,6 +129,7 @@ struct onenand_chip { ...@@ -128,6 +129,7 @@ struct onenand_chip {
onenand_state_t state; onenand_state_t state;
unsigned char *page_buf; unsigned char *page_buf;
int subpagesize;
struct nand_ecclayout *ecclayout; struct nand_ecclayout *ecclayout;
void *bbm; void *bbm;
...@@ -141,6 +143,7 @@ struct onenand_chip { ...@@ -141,6 +143,7 @@ struct onenand_chip {
#define ONENAND_CURRENT_BUFFERRAM(this) (this->bufferram_index) #define ONENAND_CURRENT_BUFFERRAM(this) (this->bufferram_index)
#define ONENAND_NEXT_BUFFERRAM(this) (this->bufferram_index ^ 1) #define ONENAND_NEXT_BUFFERRAM(this) (this->bufferram_index ^ 1)
#define ONENAND_SET_NEXT_BUFFERRAM(this) (this->bufferram_index ^= 1) #define ONENAND_SET_NEXT_BUFFERRAM(this) (this->bufferram_index ^= 1)
#define ONENAND_SET_PREV_BUFFERRAM(this) (this->bufferram_index ^= 1)
#define ONENAND_GET_SYS_CFG1(this) \ #define ONENAND_GET_SYS_CFG1(this) \
(this->read_word(this->base + ONENAND_REG_SYS_CFG1)) (this->read_word(this->base + ONENAND_REG_SYS_CFG1))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment