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:   Tue, 19 Sep 2023 18:57:30 +0300
From:   Tudor Ambarus <tudor.ambarus@...aro.org>
To:     Michael Walle <mwalle@...nel.org>
Cc:     Pratyush Yadav <pratyush@...nel.org>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org
Subject: Re: [PATCH v3 20/41] mtd: spi-nor: everspin: convert flash_info to
 new format



On 19.09.2023 14:33, Michael Walle wrote:
> Am 2023-09-19 11:24, schrieb Tudor Ambarus:
>> On 08.09.2023 13:16, Michael Walle wrote:
>>> The INFOx() macros are going away. Convert the flash_info database to
>>> the new format.
>>>
>>> Signed-off-by: Michael Walle <mwalle@...nel.org>
>>> ---
>>>  drivers/mtd/spi-nor/everspin.c | 33 +++++++++++++++++++++++++++++----
>>>  1 file changed, 29 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/mtd/spi-nor/everspin.c
>>> b/drivers/mtd/spi-nor/everspin.c
>>> index d02c32f2f7ad..46776bc10b27 100644
>>> --- a/drivers/mtd/spi-nor/everspin.c
>>> +++ b/drivers/mtd/spi-nor/everspin.c
>>> @@ -9,10 +9,35 @@
>>>  #include "core.h"
>>>
>>>  static const struct flash_info everspin_nor_parts[] = {
>>> -    { "mr25h128", CAT25_INFO(16 * 1024, 1, 256, 2) },
>>> -    { "mr25h256", CAT25_INFO(32 * 1024, 1, 256, 2) },
>>> -    { "mr25h10",  CAT25_INFO(128 * 1024, 1, 256, 3) },
>>> -    { "mr25h40",  CAT25_INFO(512 * 1024, 1, 256, 3) },
>>> +    {
>>> +        .name = "mr25h128",
>>> +        .size = SZ_16K,
>>> +        .sector_size = SZ_16K,
>>> +        .page_size = 256,
>>
>> page size defaults to 256, isn't it? Can we get rid of the page_size
>> assignments?
> 
> Yes!
> 
>>
>>> +        .addr_nbytes = 2,
>>> +        .flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR,
>>> +    }, {
>>> +        .name = "mr25h256",
>>> +        .size = SZ_32K,
>>> +        .sector_size = SZ_32K,
>>> +        .page_size = 256,
>>> +        .addr_nbytes = 2,
>>> +        .flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR,
>>> +    }, {
>>> +        .name = "mr25h10",
>>> +        .size = SZ_128K,
>>> +        .sector_size = SZ_128K,
>>> +        .page_size = 256,
>>> +        .addr_nbytes = 3,
> 
> also "addr_nbytes = 3" is the default.

ok, updating now.

> 
> -michael
> 
>>> +        .flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR,
>>> +    }, {
>>> +        .name = "mr25h40",
>>> +        .size = SZ_512K,
>>> +        .sector_size = SZ_512K,
>>> +        .page_size = 256,
>>> +        .addr_nbytes = 3,
>>> +        .flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR,
>>> +    }
>>>  };
>>>
>>>  const struct spi_nor_manufacturer spi_nor_everspin = {
>>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ