On Mon, Aug 03, 2026 at 06:43:12PM +0000, Jonas Karlman wrote:
> Hardware of various vendors, but very notably Rockchip, often uses
> 32-bit registers where the upper 16-bit half of the register is a
> write-enable mask for the lower half.
>
> Add hw_bitfield.h with two macros: FIELD_PREP_WM16, and
> FIELD_PREP_WM16_CONST. The latter is a version that can be used in
> initializers, like FIELD_PREP_CONST.
>
> Import hw_bitfield.h from Linux commit 21368fcbb124 ("bitmap: introduce
> hardware-specific bitfield operations"), first introduced in v6.18-rc1.
>
> This contains two changes compared to the Linux version:
> - include of linux/limit.h was dropped
> - use of const_true() in FIELD_PREP_WM16_CONST() was dropped
>
> Signed-off-by: Jonas Karlman <[email protected]>Reviewed-by: Tom Rini <[email protected]> -- Tom
signature.asc
Description: PGP signature
