mtd: onenand: Store bad block marker position in chip struct

The information about where the manufacturer puts the bad block
markers inside the bad block and in the OOB data is stored in
different places. Let's move this information to the chip struct,
as we did it for rawnand.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
Frieder Schrempf
2019-04-17 12:36:35 +00:00
committed by Miquel Raynal
parent 04649ec133
commit bfd15c904a
3 changed files with 7 additions and 4 deletions

View File

@@ -94,6 +94,7 @@ struct onenand_chip {
unsigned int technology;
unsigned int density_mask;
unsigned int options;
unsigned int badblockpos;
unsigned int erase_shift;
unsigned int page_shift;
@@ -188,6 +189,8 @@ struct onenand_chip {
/* Check byte access in OneNAND */
#define ONENAND_CHECK_BYTE_ACCESS(addr) (addr & 0x1)
#define ONENAND_BADBLOCK_POS 0
/*
* Options bits
*/