lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 7 Aug 2019 12:08:26 +0200
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     shiva.linuxworks@...il.com
Cc:     Richard Weinberger <richard@....at>,
        David Woodhouse <dwmw2@...radead.org>,
        Brian Norris <computersforpeace@...il.com>,
        Marek Vasut <marek.vasut@...il.com>,
        Vignesh Raghavendra <vigneshr@...com>,
        Boris Brezillon <bbrezillon@...nel.org>,
        Marcel Ziswiler <marcel.ziswiler@...adex.com>,
        Frieder Schrempf <frieder.schrempf@...tron.de>,
        Shivamurthy Shastri <sshivamurthy@...ron.com>,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Jeff Kletsky <git-commits@...ycomm.com>,
        Chuanhong Guo <gch981213@...il.com>,
        liaoweixiong <liaoweixiong@...winnertech.com>
Subject: Re: [PATCH 8/8] mtd: spinand: micron: Enable micron flashes with
 multi-die

Hi Shiva,

shiva.linuxworks@...il.com wrote on Mon, 22 Jul 2019 07:56:21 +0200:

"with multiple dies" in the title

> From: Shivamurthy Shastri <sshivamurthy@...ron.com>
> 
> Some of the Micron flashes has multi-die, and need to select the die
                             have multiple dies and
> each time while accessing it.
> 
> Signed-off-by: Shivamurthy Shastri <sshivamurthy@...ron.com>
> ---
>  drivers/mtd/nand/spi/micron.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/mtd/nand/spi/micron.c b/drivers/mtd/nand/spi/micron.c
> index 1e28ea3d1362..fa2b43caf39d 100644
> --- a/drivers/mtd/nand/spi/micron.c
> +++ b/drivers/mtd/nand/spi/micron.c
> @@ -90,6 +90,19 @@ static int micron_ecc_get_status(struct spinand_device *spinand,
>  	return -EINVAL;
>  }
>  

Please explain in a comment what you do here, like in the commit title.

> +static int micron_select_target(struct spinand_device *spinand,
> +				unsigned int target)
> +{
> +	struct spi_mem_op op = SPINAND_SET_FEATURE_OP(0xd0,
> +						      spinand->scratchbuf);
> +
> +	if (target == 1)
> +		target = 0x40;
> +
> +	*spinand->scratchbuf = target;

if (target == 1)
        *spinand->scratchbuf = 0x40

space

> +	return spi_mem_exec_op(spinand->spimem, &op);
> +}
> +
>  static int micron_spinand_detect(struct spinand_device *spinand)
>  {
>  	const struct spi_mem_op *op;
> @@ -105,6 +118,7 @@ static int micron_spinand_detect(struct spinand_device *spinand)
>  	spinand->flags = 0;
>  	spinand->eccinfo.get_status = micron_ecc_get_status;
>  	spinand->eccinfo.ooblayout = &micron_ooblayout_ops;
> +	spinand->select_target = micron_select_target;
>  
>  	op = spinand_select_op_variant(spinand,
>  				       &read_cache_variants);




Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ