[PATCH v14 03/15] mtd: spi-nor: add support for DTR protocol

Tudor.Ambarus at microchip.com Tudor.Ambarus at microchip.com
Thu Oct 1 04:49:01 EDT 2020


On 10/1/20 11:37 AM, Pratyush Yadav wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On 01/10/20 07:46AM, Tudor.Ambarus at microchip.com wrote:
>> On 9/30/20 9:57 PM, Pratyush Yadav wrote:
>>> @@ -2387,12 +2496,16 @@ spi_nor_spimem_adjust_hwcaps(struct spi_nor
>>> *nor, u32 *hwcaps)
>>>         struct spi_nor_flash_parameter *params = nor->params;
>>>         unsigned int cap;
>>>
>>> -       /* DTR modes are not supported yet, mask them all. */
>>> -       *hwcaps &= ~SNOR_HWCAPS_DTR;
>>> -
>>>         /* X-X-X modes are not supported yet, mask them all. */
>>>         *hwcaps &= ~SNOR_HWCAPS_X_X_X;
>>>
>>> +       /*
>>> +        * If the reset line is broken, we do not want to enter a stateful
>>> +        * mode.
>>> +        */
>>> +       if (nor->flags & SNOR_F_BROKEN_RESET)
>>> +               *hwcaps &= ~(SNOR_HWCAPS_X_X_X | SNOR_HWCAPS_X_X_X_DTR);
>>
>> SNOR_HWCAPS_X_X_X is already masked out above. Do we need to do it again?
> 
> That might change later and the person removing that line might not
> remember or even know to add it back here.

ok


More information about the linux-mtd mailing list