diff options
author | Boris Brezillon <bbrezillon@kernel.org> | 2018-10-25 17:10:37 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2019-04-08 10:21:12 +0200 |
commit | 629a442cad5facbebc204ff81e1974f8febab636 (patch) | |
tree | f24769f38c1fc76c8d6a1d06f08b3b621df361e7 /drivers/mtd/nand/raw/denali.c | |
parent | mtd: rawnand: Prepare things to reuse the generic NAND layer (diff) | |
download | linux-629a442cad5facbebc204ff81e1974f8febab636.tar.xz linux-629a442cad5facbebc204ff81e1974f8febab636.zip |
mtd: rawnand: Fill memorg during detection
If we want to use the generic NAND layer, we need to have the memorg
struct appropriately filled. Patch the detection code to fill this
struct.
Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/raw/denali.c')
-rw-r--r-- | drivers/mtd/nand/raw/denali.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c index 24aeafc67cd4..e99d59d85197 100644 --- a/drivers/mtd/nand/raw/denali.c +++ b/drivers/mtd/nand/raw/denali.c @@ -1096,6 +1096,9 @@ static int denali_multidev_fixup(struct denali_nand_info *denali) { struct nand_chip *chip = &denali->nand; struct mtd_info *mtd = nand_to_mtd(chip); + struct nand_memory_organization *memorg; + + memorg = nanddev_get_memorg(&chip->base); /* * Support for multi device: @@ -1125,6 +1128,8 @@ static int denali_multidev_fixup(struct denali_nand_info *denali) } /* 2 chips in parallel */ + memorg->pagesize <<= 1; + memorg->oobsize <<= 1; mtd->size <<= 1; mtd->erasesize <<= 1; mtd->writesize <<= 1; |