[PATCH v2 07/10] mtd: rawnand: brcmnand: fix CS0 layout

Michael Nazzareno Trimarchi michael at amarulasolutions.com
Mon Feb 13 08:23:18 CET 2023


On Sat, Feb 11, 2023 at 4:29 PM Linus Walleij <linus.walleij at linaro.org> wrote:
>
> From: Álvaro Fernández Rojas <noltari at gmail.com>
>
> 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 at gmail.com>
> Acked-by: Florian Fainelli <f.fainelli at gmail.com>
> Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
> Link: https://lore.kernel.org/linux-mtd/20200522121524.4161539-3-noltari@gmail.com
> [Ported to U-Boot from the Linux kernel]
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
> ---
>  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 ee7c3a21602e..1ea9091e6497 100644
> --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
> +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
> @@ -561,8 +561,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;
>         }
>
Reviewed-by: Michael Trimarchi <michael at amarulasolutions.com>

> --
> 2.39.1
>


-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael at amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info at amarulasolutions.com
www.amarulasolutions.com


More information about the U-Boot mailing list