Re: [PATCH 2/3] nand: brcmnand: fix CS0 layout
From: Miquel Raynal
Date: Mon May 11 2020 - 13:02:06 EST
Hi Ãlvaro,
Ãlvaro FernÃndez Rojas <noltari@xxxxxxxxx> wrote on Sun, 10 May 2020
17:14:05 +0200:
> Only v3.3-v5.0 have a different CS0 layout.
> v3.3- controllers use the same layout for every CS.
I had a hard time what you meant here, just because of the trailing
dash.
"Controllers before v3.3..."
would be more understandable.
Also please add a Fixes/Cc: stable tag here.
>
> Signed-off-by: Ãlvaro FernÃndez Rojas <noltari@xxxxxxxxx>
> ---
> drivers/mtd/nand/raw/brcmnand/brcmnand.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
> index 6a08dd07b058..72b268d8e3a4 100644
> --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
> +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
> @@ -606,8 +606,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;
> }
>
Thanks,
MiquÃl