All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: Tudor.Ambarus@microchip.com
Cc: vigneshr@ti.com, p.yadav@ti.com, linux-mtd@lists.infradead.org,
	miquel.raynal@bootlin.com, richard@nod.at,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/5] mtd: spi-nor: Move Software Write Protection logic out of the core
Date: Mon, 15 Mar 2021 09:43:58 +0100	[thread overview]
Message-ID: <b3c6bf8a225711f678eeee2d72ac603f@walle.cc> (raw)
In-Reply-To: <65691b2a-134d-b1f2-617e-5ef09df9a742@microchip.com>

Am 2021-03-15 07:09, schrieb Tudor.Ambarus@microchip.com:
> On 3/6/21 1:19 PM, Michael Walle wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know 
>> the content is safe
>> 
>> Am 2021-03-06 10:50, schrieb Tudor Ambarus:
>>> 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@microchip.com>
>>> ---
>> 
>> [..]
>> 
>>> @@ -3554,6 +3152,9 @@ int spi_nor_scan(struct spi_nor *nor, const 
>>> char
>>> *name,
>>>       if (ret)
>>>               return ret;
>>> 
>>> +     if (nor->params->locking_ops)
>> 
>> Should this be in spi_nor_register_locking_ops(), too? I.e.
>> 
>> void spi_nor_register_locking_ops() {
>>     if (!nor->params->locking_ops)
>>         return;
>> ..
>> }
> 
> Yes, the checking should be done inside spi_nor_register_locking_ops,
> will move it.
> 
> Btw, what do you find a better name, spi_nor_register_locking_ops or
> spi_nor_init_locking_ops? Applies to OTP as well.

probably register_locking_ops(), as long as the function just does
that.

For OTP, I want to provide nvmem support, too. Thus it will not
only register the mtd ops and thus spi_nor_otp_init() will be
better for my case.

-michael

WARNING: multiple messages have this Message-ID (diff)
From: Michael Walle <michael@walle.cc>
To: Tudor.Ambarus@microchip.com
Cc: vigneshr@ti.com, p.yadav@ti.com, linux-mtd@lists.infradead.org,
	miquel.raynal@bootlin.com, richard@nod.at,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/5] mtd: spi-nor: Move Software Write Protection logic out of the core
Date: Mon, 15 Mar 2021 09:43:58 +0100	[thread overview]
Message-ID: <b3c6bf8a225711f678eeee2d72ac603f@walle.cc> (raw)
In-Reply-To: <65691b2a-134d-b1f2-617e-5ef09df9a742@microchip.com>

Am 2021-03-15 07:09, schrieb Tudor.Ambarus@microchip.com:
> On 3/6/21 1:19 PM, Michael Walle wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know 
>> the content is safe
>> 
>> Am 2021-03-06 10:50, schrieb Tudor Ambarus:
>>> 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@microchip.com>
>>> ---
>> 
>> [..]
>> 
>>> @@ -3554,6 +3152,9 @@ int spi_nor_scan(struct spi_nor *nor, const 
>>> char
>>> *name,
>>>       if (ret)
>>>               return ret;
>>> 
>>> +     if (nor->params->locking_ops)
>> 
>> Should this be in spi_nor_register_locking_ops(), too? I.e.
>> 
>> void spi_nor_register_locking_ops() {
>>     if (!nor->params->locking_ops)
>>         return;
>> ..
>> }
> 
> Yes, the checking should be done inside spi_nor_register_locking_ops,
> will move it.
> 
> Btw, what do you find a better name, spi_nor_register_locking_ops or
> spi_nor_init_locking_ops? Applies to OTP as well.

probably register_locking_ops(), as long as the function just does
that.

For OTP, I want to provide nvmem support, too. Thus it will not
only register the mtd ops and thus spi_nor_otp_init() will be
better for my case.

-michael

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  parent reply	other threads:[~2021-03-15  8:44 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-06  9:49 [PATCH v2 0/5] mtd: spi-nor: Cleanup patches Tudor Ambarus
2021-03-06  9:49 ` Tudor Ambarus
2021-03-06  9:49 ` [PATCH v2 1/5] mtd: spi-nor: core: Advance erase after the erase cmd has been completed Tudor Ambarus
2021-03-06  9:49   ` Tudor Ambarus
2021-03-06  9:49 ` [PATCH v2 2/5] mtd: spi-nor: core: Add vdbg msg for spi_nor_erase_multi_sectors() Tudor Ambarus
2021-03-06  9:49   ` Tudor Ambarus
2021-03-08  6:21   ` Pratyush Yadav
2021-03-08  6:21     ` Pratyush Yadav
2021-03-06  9:50 ` [PATCH v2 3/5] mtd: spi-nor: Get rid of duplicated argument in spi_nor_parse_sfdp() Tudor Ambarus
2021-03-06  9:50   ` Tudor Ambarus
2021-03-08  6:26   ` Pratyush Yadav
2021-03-08  6:26     ` Pratyush Yadav
2021-03-06  9:50 ` [PATCH v2 4/5] mtd: spi-nor: Move Software Write Protection logic out of the core Tudor Ambarus
2021-03-06  9:50   ` Tudor Ambarus
2021-03-06 11:19   ` Michael Walle
2021-03-06 11:19     ` Michael Walle
2021-03-15  6:09     ` Tudor.Ambarus
2021-03-15  6:09       ` Tudor.Ambarus
2021-03-15  8:27       ` Pratyush Yadav
2021-03-15  8:27         ` Pratyush Yadav
2021-03-15  8:43       ` Michael Walle [this message]
2021-03-15  8:43         ` Michael Walle
2021-03-08 17:28   ` Vignesh Raghavendra
2021-03-08 17:28     ` Vignesh Raghavendra
2021-03-09  7:28     ` Tudor.Ambarus
2021-03-09  7:28       ` Tudor.Ambarus
2021-03-15  6:23       ` Vignesh Raghavendra
2021-03-15  6:23         ` Vignesh Raghavendra
2021-03-17  6:09         ` Tudor.Ambarus
2021-03-17  6:09           ` Tudor.Ambarus
2021-03-17  8:21           ` Michael Walle
2021-03-17  8:21             ` Michael Walle
2021-03-17  9:30             ` Tudor.Ambarus
2021-03-17  9:30               ` Tudor.Ambarus
2021-03-17 17:50               ` Michael Walle
2021-03-17 17:50                 ` Michael Walle
2021-03-17  9:05           ` Pratyush Yadav
2021-03-17  9:05             ` Pratyush Yadav
2021-03-17 16:14             ` Vignesh Raghavendra
2021-03-17 16:14               ` Vignesh Raghavendra
2021-03-06  9:50 ` [PATCH v2 5/5] mtd: spi-nor: swp: Drop 'else' after 'return' Tudor Ambarus
2021-03-06  9:50   ` Tudor Ambarus
2021-03-08  6:28   ` Pratyush Yadav
2021-03-08  6:28     ` Pratyush Yadav
2021-03-15  6:53     ` Joe Perches
2021-03-15  6:53       ` Joe Perches
2021-03-15 11:24       ` Tudor.Ambarus
2021-03-15 11:24         ` Tudor.Ambarus
2021-03-15 14:43         ` Joe Perches
2021-03-15 14:43           ` Joe Perches
2021-03-17  5:55 ` (subset) [PATCH v2 0/5] mtd: spi-nor: Cleanup patches Tudor Ambarus
2021-03-17  5:55   ` Tudor Ambarus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b3c6bf8a225711f678eeee2d72ac603f@walle.cc \
    --to=michael@walle.cc \
    --cc=Tudor.Ambarus@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=p.yadav@ti.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.