[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210401175052.1ff2bad2@collabora.com>
Date: Thu, 1 Apr 2021 17:50:52 +0200
From: Boris Brezillon <boris.brezillon@...labora.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Cc: Miquel Raynal <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 v8 3/3] mtd: rawnand: Add support for secure regions in
NAND memory
On Thu, 1 Apr 2021 15:48:12 +0530
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org> wrote:
> static int nand_isbad_bbm(struct nand_chip *chip, loff_t ofs)
> {
> + struct mtd_info *mtd = nand_to_mtd(chip);
> + int last_page = ((mtd->erasesize - mtd->writesize) >>
> + chip->page_shift) & chip->pagemask;
> int ret;
>
> if (chip->options & NAND_NO_BBM_QUIRK)
> return 0;
>
> /* Check if the region is secured */
> - ret = nand_check_secure_region(chip, ofs, 0);
> + ret = nand_check_secure_region(chip, ofs, last_page);
or just:
ret = nand_check_secure_region(chip, ofs, mtd->erasesize);
> if (ret)
> return ret;
>
> > */
> >
Powered by blists - more mailing lists