<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/linux/hw_bitfield.h, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/include/linux/hw_bitfield.h?h=main</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/include/linux/hw_bitfield.h?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2026-08-11T15:35:22Z</updated>
<entry>
<title>include: linux: Import hw_bitfield.h from Linux v6.18</title>
<updated>2026-08-11T15:35:22Z</updated>
<author>
<name>Jonas Karlman</name>
<email>jonas@kwiboo.se</email>
</author>
<published>2026-08-03T18:43:12Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0c68b88ce574ddaa2f94f3e5d747c25db693dc18'/>
<id>urn:sha1:0c68b88ce574ddaa2f94f3e5d747c25db693dc18</id>
<content type='text'>
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 &lt;jonas@kwiboo.se&gt;
Acked-by: Quentin Schulz &lt;quentin.schulz@cherry.de&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Link: https://patch.msgid.link/20260803184314.2240153-2-jonas@kwiboo.se
Signed-off-by: Quentin Schulz &lt;u-boot@0leil.net&gt;
</content>
</entry>
</feed>
