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

William Zhang william.zhang at broadcom.com
Wed Feb 22 02:15:04 CET 2023



On 02/11/2023 07:29 AM, Linus Walleij 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;
>   	}
>   
> 

Acked-by: William Zhang <william.zhang at broadcom.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4212 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230221/bc3903fa/attachment.bin>


More information about the U-Boot mailing list