Re: [PATCH v2 1/2] include: linux: Import hw_bitfield.h from Linux v6.18
Tom Rini <[email protected]>
| Newsgroups | org.u-boot-project.lists.u-boot |
|---|---|
| Message-ID | <20260811151921.GA3044694@bill-the-cat> |
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
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTzzqh0PWDgGS+bTHor4qD1Cr/kCgUCans9cgAKCRAr4qD1Cr/k ClbkAP4wJ/olYpS/5oP621ucPt7UM9yKywmkTDpgBBdQ1ETkKAD/SFK9LZos3LPQ 78+U6xDOudfAPC/pIF9kDvtUMIdkOgM= =1Q0t -----END PGP SIGNATURE-----