[PATCH v14 07/18] mtd: nand: raw: sunxi: Convert to common field_{get, prep}() helpers
Mikhail Kshevetskiy
mikhail.kshevetskiy at iopsys.eu
Thu Jul 2 07:57:33 CEST 2026
Drop the driver-specific field_get() and field_prep() macros, in favor
of the globally available variants from <linux/bitfield.h>.
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy at iopsys.eu>
---
drivers/mtd/nand/raw/sunxi_nand.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/mtd/nand/raw/sunxi_nand.h b/drivers/mtd/nand/raw/sunxi_nand.h
index d7a8b3dd40c..1b2c514852d 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.h
+++ b/drivers/mtd/nand/raw/sunxi_nand.h
@@ -24,10 +24,7 @@
#define SUNXI_NAND_H
#include <linux/bitops.h>
-
-/* 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))
+#include <linux/bitfield.h>
#define NFC_REG_CTL 0x0000
#define NFC_REG_ST 0x0004
--
2.53.0
More information about the U-Boot
mailing list