diff options
Diffstat (limited to 'drivers/mtd/onenand')
-rw-r--r-- | drivers/mtd/onenand/onenand_base.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 65acb85830d3..daf298948b9b 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c | |||
@@ -1966,13 +1966,12 @@ static int onenand_probe(struct mtd_info *mtd) | |||
1966 | /* The data buffer size is equal to page size */ | 1966 | /* The data buffer size is equal to page size */ |
1967 | mtd->writesize = this->read_word(this->base + ONENAND_REG_DATA_BUFFER_SIZE); | 1967 | mtd->writesize = this->read_word(this->base + ONENAND_REG_DATA_BUFFER_SIZE); |
1968 | mtd->oobsize = mtd->writesize >> 5; | 1968 | mtd->oobsize = mtd->writesize >> 5; |
1969 | /* Pagers per block is always 64 in OneNAND */ | 1969 | /* Pages per a block are always 64 in OneNAND */ |
1970 | mtd->erasesize = mtd->writesize << 6; | 1970 | mtd->erasesize = mtd->writesize << 6; |
1971 | 1971 | ||
1972 | this->erase_shift = ffs(mtd->erasesize) - 1; | 1972 | this->erase_shift = ffs(mtd->erasesize) - 1; |
1973 | this->page_shift = ffs(mtd->writesize) - 1; | 1973 | this->page_shift = ffs(mtd->writesize) - 1; |
1974 | this->ppb_shift = (this->erase_shift - this->page_shift); | 1974 | this->page_mask = (1 << (this->erase_shift - this->page_shift)) - 1; |
1975 | this->page_mask = (mtd->erasesize / mtd->writesize) - 1; | ||
1976 | 1975 | ||
1977 | /* REVIST: Multichip handling */ | 1976 | /* REVIST: Multichip handling */ |
1978 | 1977 | ||