[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200109175107.57566c18@xps13>
Date: Thu, 9 Jan 2020 17:51:07 +0100
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Mason Yang <masonccyang@...c.com.tw>
Cc: richard@....at, marek.vasut@...il.com, dwmw2@...radead.org,
bbrezillon@...nel.org, computersforpeace@...il.com,
vigneshr@...com, robh+dt@...nel.org, mark.rutland@....com,
devicetree@...r.kernel.org, juliensu@...c.com.tw,
linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org
Subject: Re: [PATCH v4 1/2] mtd: rawnand: Add support for Macronix NAND
randomizer
Hi Mason,
Mason Yang <masonccyang@...c.com.tw> wrote on Thu, 24 Oct 2019 15:40:06
+0800:
> Macronix NANDs support randomizer operation for user data scrambled,
> which can be enabled with a SET_FEATURE.
>
> User data written to the NAND device without randomizer is still readable
> after randomizer function enabled.
> The penalty of randomizer are subpage accesses prohibited and more time
> period is needed in program operation and entering deep power-down mode.
> i.e., tPROG 300us to 340us(randomizer enabled)
>
> For more high-reliability concern, if subpage write not available with
> hardware ECC and then to enable randomizer is recommended by default.
> Driver checks byte 167 of Vendor Blocks in ONFI parameter page table
> to see if this high-reliability function is supported. By adding a new
> specific DT property in children nodes to enable randomizer function.
>
> Signed-off-by: Mason Yang <masonccyang@...c.com.tw>
> ---
> drivers/mtd/nand/raw/nand_macronix.c | 69 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 69 insertions(+)
>
> diff --git a/drivers/mtd/nand/raw/nand_macronix.c b/drivers/mtd/nand/raw/nand_macronix.c
> index 58511ae..89101fa 100644
> --- a/drivers/mtd/nand/raw/nand_macronix.c
> +++ b/drivers/mtd/nand/raw/nand_macronix.c
> @@ -11,6 +11,14 @@
> #define MACRONIX_READ_RETRY_BIT BIT(0)
> #define MACRONIX_NUM_READ_RETRY_MODES 6
>
> +#define MACRONIX_RANDOMIZER_BIT BIT(1)
> +#define ONFI_FEATURE_ADDR_MXIC_RANDOMIZER 0xB0
> +#define ENPGM BIT(0)
> +#define RANDEN BIT(1)
> +#define RANDOPT BIT(2)
I forgot: please be consistent with the naming.
Thanks,
Miquèl
Powered by blists - more mailing lists