src/include: Add PnP/HWM unset_and_set functions
commit64a6b6cb1f0476087ec538c6d55791506d5e9576
authorAngel Pons <th3fanbus@gmail.com>
Fri, 5 Jun 2020 17:10:03 +0000 (5 19:10 +0200)
committerFelix Held <felix-coreboot@felixheld.de>
Fri, 18 Sep 2020 12:06:38 +0000 (18 12:06 +0000)
tree3913db709870ef295f0ca9e323319af691c94942
parent1502494cbac65282f5344b2b0b7ca5ea03cd0c76
src/include: Add PnP/HWM unset_and_set functions

RMW (read/modify/write) ops on PnP devices has never been so simple.

The semantics also allow the compiler to emit valid warnings if the
input parameters would overflow, which are silenced when the cast is
placed outside of the function.

Change-Id: Ica01211af2a9a00aed98880844a836f6b7957b14
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42134
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
src/include/device/pnp.h
src/include/device/pnp_ops.h
src/include/superio/hwm5_conf.h