[PATCH v3 07/15] mtd: rawnand: sunxi: introduce ecc_mode_mask in sunxi_nfc_caps
Richard GENOUD
richard.genoud at bootlin.com
Fri Oct 24 00:52:27 PDT 2025
Hi,
Le 22/10/2025 à 11:05, Miquel Raynal a écrit :
> Hi Richard,
>
> On 20/10/2025 at 12:13:03 +02, Richard Genoud <richard.genoud at bootlin.com> wrote:
>
>> The H6/H616 ECC_MODE field is not at the same offset, and has not the
>> same size.
>> So move the mask into sunxi_nfc_caps.
>>
>> No functional change.
>>
>> Signed-off-by: Richard Genoud <richard.genoud at bootlin.com>
>> ---
>> drivers/mtd/nand/raw/sunxi_nand.c | 13 +++++++++----
>> 1 file changed, 9 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
>> index 70c940840dda..4118307cac15 100644
>> --- a/drivers/mtd/nand/raw/sunxi_nand.c
>> +++ b/drivers/mtd/nand/raw/sunxi_nand.c
>> @@ -29,8 +29,9 @@
>> #include <linux/iopoll.h>
>> #include <linux/reset.h>
>>
>> -/* non compile-time field get */
>> +/* non compile-time field get/prep */
>> #define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
>> +#define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) &
>> (_mask))
>
> This could probably require a mention in the commit message, as for the
> introduction of the field_get() helper.
>
> No need to resend just for this either.
Ok, will do.
>
> Thanks,
> Miquèl
>
Thanks!
--
Richard Genoud, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
More information about the linux-mtd
mailing list