summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/raw/nand_base.c
diff options
context:
space:
mode:
authorChris Packham <chris.packham@alliedtelesis.co.nz>2018-06-25 01:44:44 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2018-07-02 10:02:16 +0300
commit00ce4e039ad5bded462931606c3063ff691964b7 (patch)
treee6bc5845d919e130e59f9725a8a66936e4277fe6 /drivers/mtd/nand/raw/nand_base.c
parented6d0285f81cbf27d8294b47ac0bc8f28041b186 (diff)
downloadlinux-00ce4e039ad5bded462931606c3063ff691964b7.tar.xz
mtd: rawnand: add manufacturer fixup for ONFI parameter page
This is called after the ONFI parameter page checksum is verified and allows us to override the contents of the parameter page. Suggested-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/raw/nand_base.c')
-rw-r--r--drivers/mtd/nand/raw/nand_base.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index 1c633f80c3e1..f362c09a71d7 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -5168,6 +5168,10 @@ static int nand_flash_detect_onfi(struct nand_chip *chip)
}
}
+ if (chip->manufacturer.desc && chip->manufacturer.desc->ops &&
+ chip->manufacturer.desc->ops->fixup_onfi_param_page)
+ chip->manufacturer.desc->ops->fixup_onfi_param_page(chip, p);
+
/* Check version */
val = le16_to_cpu(p->revision);
if (val & (1 << 5))