Re: [PATCH v1 1/3] mtd: rawnand: nand_base: support for 'NAND_IS_BOOT_MEDIUM' flag
Michael Nazzareno Trimarchi <[email protected]>
| Newsgroups | io.groups.u-boot-amlogic,org.u-boot-project.lists.u-boot |
|---|---|
| Message-ID | <CAOf5uwnmMmY5c0zj9Y1EOYxfFJ0mUy9Vvj9-7kZ0=Ry-uVrS_w@mail.gmail.com> |
Hi Yes I have seen and I will review today and cross-check. Did you lunch the testing on the other patches series? I would like to merge at all but we were having some build breakage Michael On Mon, Jun 24, 2024 at 7:16 AM Arseniy Krasnov <[email protected]> wrote: > > Hi, sorry, pls ping :) > > Thanks > > On 02.06.2024 23:08, Arseniy Krasnov wrote: > > Based on Linux kernel: > > commit f922bd798bb9 ("mtd: rawnand: add an option to specify NAND chip as a boot device") > > > > Allow to define a NAND chip as a boot device. This can be helpful > > for the selection of the ECC algorithm and strength in case the boot > > ROM supports only a subset of controller provided options. > > > > Signed-off-by: Arseniy Krasnov <[email protected]> > > --- > > drivers/mtd/nand/raw/nand_base.c | 3 +++ > > include/linux/mtd/rawnand.h | 6 ++++++ > > 2 files changed, 9 insertions(+) > > > > diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c > > index c40a0f23d7..ed605b4af5 100644 > > --- a/drivers/mtd/nand/raw/nand_base.c > > +++ b/drivers/mtd/nand/raw/nand_base.c > > @@ -4458,6 +4458,9 @@ static int nand_dt_init(struct mtd_info *mtd, struct nand_chip *chip, ofnode nod > > if (ret == 16) > > chip->options |= NAND_BUSWIDTH_16; > > > > + if (ofnode_read_bool(node, "nand-is-boot-medium")) > > + chip->options |= NAND_IS_BOOT_MEDIUM; > > + > > if (ofnode_read_bool(node, "nand-on-flash-bbt")) > > chip->bbt_options |= NAND_BBT_USE_FLASH; > > > > diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h > > index fb002ae641..4eb880d8fb 100644 > > --- a/include/linux/mtd/rawnand.h > > +++ b/include/linux/mtd/rawnand.h > > @@ -218,6 +218,12 @@ enum nand_ecc_algo { > > /* Device needs 3rd row address cycle */ > > #define NAND_ROW_ADDR_3 0x00004000 > > > > +/* > > + * Whether the NAND chip is a boot medium. Drivers might use this information > > + * to select ECC algorithms supported by the boot ROM or similar restrictions. > > + */ > > +#define NAND_IS_BOOT_MEDIUM 0x00400000 > > + > > /* Options valid for Samsung large page devices */ > > #define NAND_SAMSUNG_LP_OPTIONS NAND_CACHEPRG > > -- Michael Nazzareno Trimarchi Co-Founder & Chief Executive Officer M. +39 347 913 2170 [email protected] __________________________________ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172 [email protected] www.amarulasolutions.com