]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mtd: nand: raw: sunxi: Convert to common field_{get, prep}() helpers
authorMikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Fri, 3 Jul 2026 11:56:16 +0000 (14:56 +0300)
committerTom Rini <trini@konsulko.com>
Wed, 8 Jul 2026 19:29:18 +0000 (13:29 -0600)
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@iopsys.eu>
drivers/mtd/nand/raw/sunxi_nand.h

index b470e1d33688b1f27893e8c07a0f30066fa2c7a8..1b2c514852d78b43b2b1da3d9bbed27f7f9b6002 100644 (file)
 #define SUNXI_NAND_H
 
 #include <linux/bitops.h>
-
-/* non compile-time field get/prep */
-#undef field_get
-#define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
-#undef field_prep
-#define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
+#include <linux/bitfield.h>
 
 #define NFC_REG_CTL            0x0000
 #define NFC_REG_ST             0x0004