[PATCH v3 07/15] mtd: rawnand: sunxi: introduce ecc_mode_mask in sunxi_nfc_caps
Miquel Raynal
miquel.raynal at bootlin.com
Wed Oct 22 02:05:02 PDT 2025
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.
Thanks,
Miquèl
More information about the linux-arm-kernel
mailing list