Commit 419486ab authored by Álvaro Fernández Rojas's avatar Álvaro Fernández Rojas Committed by Greg Kroah-Hartman

mtd: rawnand: brcmnand: fix CS0 layout

commit 3d3fb3c5 upstream.

Only v3.3-v5.0 have a different CS0 layout.
Controllers before v3.3 use the same layout for every CS.

Fixes: 27c5b17c ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller")
Signed-off-by: default avatarÁlvaro Fernández Rojas <noltari@gmail.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200522121524.4161539-3-noltari@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cd77d102
...@@ -491,8 +491,9 @@ static int brcmnand_revision_init(struct brcmnand_controller *ctrl) ...@@ -491,8 +491,9 @@ static int brcmnand_revision_init(struct brcmnand_controller *ctrl)
} else { } else {
ctrl->cs_offsets = brcmnand_cs_offsets; ctrl->cs_offsets = brcmnand_cs_offsets;
/* v5.0 and earlier has a different CS0 offset layout */ /* v3.3-5.0 have a different CS0 offset layout */
if (ctrl->nand_version <= 0x0500) if (ctrl->nand_version >= 0x0303 &&
ctrl->nand_version <= 0x0500)
ctrl->cs0_offsets = brcmnand_cs_offsets_cs0; ctrl->cs0_offsets = brcmnand_cs_offsets_cs0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment