Message ID | 20230211152909.1436133-7-linus.walleij@linaro.org |
---|---|
State | New |
Headers | show |
Series | Backport BRCMNAND changes from Linux | expand |
Hi On Sat, Feb 11, 2023 at 4:29 PM Linus Walleij <linus.walleij@linaro.org> wrote: > > From: Álvaro Fernández Rojas <noltari@gmail.com> > > These registers are also used on v3.3. > > Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> > Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.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-2-noltari@gmail.com > [Ported to U-Boot from the Linux kernel] > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > --- > drivers/mtd/nand/raw/brcmnand/brcmnand.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c > index 5d3fb460d89a..ee7c3a21602e 100644 > --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c > +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c > @@ -293,8 +293,8 @@ enum brcmnand_reg { > BRCMNAND_FC_BASE, > }; > > -/* BRCMNAND v4.0 */ > -static const u16 brcmnand_regs_v40[] = { > +/* BRCMNAND v3.3-v4.0 */ > +static const u16 brcmnand_regs_v33[] = { > [BRCMNAND_CMD_START] = 0x04, > [BRCMNAND_CMD_EXT_ADDRESS] = 0x08, > [BRCMNAND_CMD_ADDRESS] = 0x0c, > @@ -546,8 +546,8 @@ static int brcmnand_revision_init(struct brcmnand_controller *ctrl) > ctrl->reg_offsets = brcmnand_regs_v60; > else if (ctrl->nand_version >= 0x0500) > ctrl->reg_offsets = brcmnand_regs_v50; > - else if (ctrl->nand_version >= 0x0400) > - ctrl->reg_offsets = brcmnand_regs_v40; > + else if (ctrl->nand_version >= 0x0303) > + ctrl->reg_offsets = brcmnand_regs_v33; > > /* Chip-select stride */ > if (ctrl->nand_version >= 0x0701) > -- > 2.39.1 > Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
On 02/11/2023 07:29 AM, Linus Walleij wrote: > From: Álvaro Fernández Rojas <noltari@gmail.com> > > These registers are also used on v3.3. > > Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> > Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.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-2-noltari@gmail.com > [Ported to U-Boot from the Linux kernel] > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > --- > drivers/mtd/nand/raw/brcmnand/brcmnand.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c > index 5d3fb460d89a..ee7c3a21602e 100644 > --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c > +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c > @@ -293,8 +293,8 @@ enum brcmnand_reg { > BRCMNAND_FC_BASE, > }; > > -/* BRCMNAND v4.0 */ > -static const u16 brcmnand_regs_v40[] = { > +/* BRCMNAND v3.3-v4.0 */ > +static const u16 brcmnand_regs_v33[] = { > [BRCMNAND_CMD_START] = 0x04, > [BRCMNAND_CMD_EXT_ADDRESS] = 0x08, > [BRCMNAND_CMD_ADDRESS] = 0x0c, > @@ -546,8 +546,8 @@ static int brcmnand_revision_init(struct brcmnand_controller *ctrl) > ctrl->reg_offsets = brcmnand_regs_v60; > else if (ctrl->nand_version >= 0x0500) > ctrl->reg_offsets = brcmnand_regs_v50; > - else if (ctrl->nand_version >= 0x0400) > - ctrl->reg_offsets = brcmnand_regs_v40; > + else if (ctrl->nand_version >= 0x0303) > + ctrl->reg_offsets = brcmnand_regs_v33; > > /* Chip-select stride */ > if (ctrl->nand_version >= 0x0701) > Acked-by: William Zhang <william.zhang@broadcom.com>
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index 5d3fb460d89a..ee7c3a21602e 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -293,8 +293,8 @@ enum brcmnand_reg { BRCMNAND_FC_BASE, }; -/* BRCMNAND v4.0 */ -static const u16 brcmnand_regs_v40[] = { +/* BRCMNAND v3.3-v4.0 */ +static const u16 brcmnand_regs_v33[] = { [BRCMNAND_CMD_START] = 0x04, [BRCMNAND_CMD_EXT_ADDRESS] = 0x08, [BRCMNAND_CMD_ADDRESS] = 0x0c, @@ -546,8 +546,8 @@ static int brcmnand_revision_init(struct brcmnand_controller *ctrl) ctrl->reg_offsets = brcmnand_regs_v60; else if (ctrl->nand_version >= 0x0500) ctrl->reg_offsets = brcmnand_regs_v50; - else if (ctrl->nand_version >= 0x0400) - ctrl->reg_offsets = brcmnand_regs_v40; + else if (ctrl->nand_version >= 0x0303) + ctrl->reg_offsets = brcmnand_regs_v33; /* Chip-select stride */ if (ctrl->nand_version >= 0x0701)