diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2020-05-22 14:15:21 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-05-31 10:53:37 +0200 |
commit | 3d3fb3c5be9ce07fa85d8f67fb3922e4613b955b (patch) | |
tree | 83154abad6b1191c989cd3ee0d331cdd5581b762 /drivers/mtd | |
parent | 4fd639092b17d4252368b6009573339aeab5c7bd (diff) | |
download | linux-3d3fb3c5be9ce07fa85d8f67fb3922e4613b955b.tar.bz2 |
mtd: rawnand: brcmnand: fix CS0 layout
Only v3.3-v5.0 have a different CS0 layout.
Controllers before v3.3 use the same layout for every CS.
Fixes: 27c5b17cd1b1 ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200522121524.4161539-3-noltari@gmail.com
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/raw/brcmnand/brcmnand.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index 0abd5d5fd54d..0a2a76195047 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -605,8 +605,9 @@ static int brcmnand_revision_init(struct brcmnand_controller *ctrl) } else { ctrl->cs_offsets = brcmnand_cs_offsets; - /* v5.0 and earlier has a different CS0 offset layout */ - if (ctrl->nand_version <= 0x0500) + /* v3.3-5.0 have a different CS0 offset layout */ + if (ctrl->nand_version >= 0x0303 && + ctrl->nand_version <= 0x0500) ctrl->cs0_offsets = brcmnand_cs_offsets_cs0; } |