Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35463 )
Change subject: device/mmio.h: Add bit field helpers ......................................................................
Patch Set 13:
Right. If there was clrsetbits32 I'd definitely use them.
Just to close the loop here, CB:36596 recently added another API for register read/modify/write (which just uses host byte order). I think it may be generally useful to have both endian-specific and host byte order functions for this (and maybe find&replace over the codebase once because I'm pretty sure all current instances of clrsetbits_le32() were just intending to use host byte order), but I don't like that they're defined in completely separate places with completely separate names right now. Maybe we should remove the update32() stuff again and instead add a clrbits32()/setbits32()/clrsetbits32() (without the le/be) API to do that instead.