[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210319175659.17c9e8e6@collabora.com>
Date: Fri, 19 Mar 2021 17:56:59 +0100
From: Boris Brezillon <boris.brezillon@...labora.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Cc: miquel.raynal@...tlin.com, richard@....at, vigneshr@...com,
robh+dt@...nel.org, linux-arm-msm@...r.kernel.org,
devicetree@...r.kernel.org, linux-mtd@...ts.infradead.org,
linux-kernel@...r.kernel.org, Daniele.Palmas@...it.com,
bjorn.andersson@...aro.org
Subject: Re: [PATCH v7 3/3] mtd: rawnand: Add support for secure regions in
NAND memory
On Fri, 19 Mar 2021 20:30:10 +0530
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org> wrote:
> @@ -2737,6 +2783,11 @@ static int nand_read_page_swecc(struct nand_chip *chip, uint8_t *buf,
> uint8_t *ecc_code = chip->ecc.code_buf;
> unsigned int max_bitflips = 0;
>
> + /* Check if the region is secured */
> + ret = nand_check_secure_region(chip, ((loff_t)page << chip->page_shift), 0);
> + if (ret)
> + return ret;
> +
I'm lost. Why do you need to do that here if it's already done in
nand_do_read_{ops,oob}()?
> chip->ecc.read_page_raw(chip, buf, 1, page);
>
> for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize)
Powered by blists - more mailing lists