]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
clk: renesas: rcar-cpg-lib: Convert to common field_{get, prep}() helpers
authorMikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Fri, 3 Jul 2026 11:56:17 +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/clk/renesas/rcar-cpg-lib.c

index 5d1c8514adfbc0bd3bbdcd986831c60fba18f23b..8e992d2c2da2bebe2540f422d2656eec176c0564 100644 (file)
 #define SDnSRCFC_SHIFT         2
 #define STPnHCK_TABLE          (CPG_SDCKCR_STPnHCK >> SDnSRCFC_SHIFT)
 
-/* Non-constant mask variant of FIELD_GET/FIELD_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))
-
 static const struct clk_div_table cpg_sdh_div_table[] = {
        { 0, 1 }, { 1, 2 }, { STPnHCK_TABLE | 2, 4 }, { STPnHCK_TABLE | 3, 8 },
        { STPnHCK_TABLE | 4, 16 }, { 0, 0 },