[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9889bae0-8eba-7cbc-d9bb-04e038bd28c8@microchip.com>
Date: Tue, 9 Mar 2021 07:28:51 +0000
From: <Tudor.Ambarus@...rochip.com>
To: <vigneshr@...com>, <p.yadav@...com>, <michael@...le.cc>
CC: <linux-mtd@...ts.infradead.org>, <miquel.raynal@...tlin.com>,
<richard@....at>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 4/5] mtd: spi-nor: Move Software Write Protection logic
out of the core
On 3/8/21 7:28 PM, Vignesh Raghavendra wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On 3/6/21 3:20 PM, Tudor Ambarus wrote:
>> It makes the core file a bit smaller and provides better separation
>> between the Software Write Protection features and the core logic.
>> All the next generic software write protection features (e.g. Individual
>> Block Protection) will reside in swp.c.
>>
>> Signed-off-by: Tudor Ambarus <tudor.ambarus@...rochip.com>
>> ---
>> drivers/mtd/spi-nor/Makefile | 2 +-
>> drivers/mtd/spi-nor/core.c | 407 +---------------------------------
>> drivers/mtd/spi-nor/core.h | 4 +
>> drivers/mtd/spi-nor/swp.c | 419 +++++++++++++++++++++++++++++++++++
>
> Hmmm, name swp.c does not seem intuitive to me. How about expanding it a
> bit:
>
> soft-wr-protect.c or software-write-protect.c ?
>
I thought about the SWP configs that we have.
How about keeping swp.c and rename configs to:
s/MTD_SPI_NOR_SWP_DISABLE/MTD_SPI_NOR_DISABLE_BOOT_SWP
s/MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE/MTD_SPI_DISABLE_BOOT_SWP_ON_VOLATILE
s/MTD_SPI_NOR_SWP_KEEP/MTD_SPI_NOR_KEEP_BOOT_SWP
The renamed configs should better indicate that the software write protection
is disabled just at boot time, while the locking support is still enabled.
Otherwise one may think that with a MTD_SPI_NOR_SWP_DISABLE, all the
software write protection features are stripped/not available.
Cheers,
ta
Powered by blists - more mailing lists